Remove warning about extraneous "ruby-" prefix in .ruby-version
When we started to support reading `.ruby-version` files, we made a commitment to not support fuzzy version matching. Treating "ruby-2.1.5" as "2.1.5" is a sort of fuzzy matching, so we put in place a warning telling you to remove the extraneous "ruby-" prefix popularly used by other Ruby version managers to denote MRI. (Their logic is that MRI is "ruby" and other rubies are not "ruby", apparently.) However, people are often not able to remove the prefix in their projects because they want to support other coworkers and tools that sadly still require the prefix, like RubyMine. So to restore sanity for a big portion of our users, the warning is gone.
This commit is contained in:
parent
7e0e85bdda
commit
6820704c91
@ -21,9 +21,6 @@ version_exists() {
|
|||||||
if version_exists "$RBENV_VERSION"; then
|
if version_exists "$RBENV_VERSION"; then
|
||||||
echo "$RBENV_VERSION"
|
echo "$RBENV_VERSION"
|
||||||
elif version_exists "${RBENV_VERSION#ruby-}"; then
|
elif version_exists "${RBENV_VERSION#ruby-}"; then
|
||||||
{ echo "warning: ignoring extraneous \`ruby-' prefix in version \`${RBENV_VERSION}'"
|
|
||||||
echo " (set by $(rbenv-version-origin))"
|
|
||||||
} >&2
|
|
||||||
echo "${RBENV_VERSION#ruby-}"
|
echo "${RBENV_VERSION#ruby-}"
|
||||||
else
|
else
|
||||||
echo "rbenv: version \`$RBENV_VERSION' is not installed" >&2
|
echo "rbenv: version \`$RBENV_VERSION' is not installed" >&2
|
||||||
|
@ -57,9 +57,5 @@ setup() {
|
|||||||
cat > ".ruby-version" <<<"ruby-1.8.7"
|
cat > ".ruby-version" <<<"ruby-1.8.7"
|
||||||
run rbenv-version-name
|
run rbenv-version-name
|
||||||
assert_success
|
assert_success
|
||||||
assert_output <<OUT
|
assert_output "1.8.7"
|
||||||
warning: ignoring extraneous \`ruby-' prefix in version \`ruby-1.8.7'
|
|
||||||
(set by ${PWD}/.ruby-version)
|
|
||||||
1.8.7
|
|
||||||
OUT
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user