scripts/selector in rvm-0.0.49 vs scripts/selector in rvm-0.0.50
- old
+ new
@@ -52,11 +52,11 @@
;;
jruby)
rvm_ruby_version="${rvm_ruby_version:-`__rvm_db "jruby_version"`}"
unset rvm_ruby_patch_level
- if [ ! -z "$(echo $rvm_ruby_version | awk '/^1\.2\.0/')" -o ! -z "$(rvm_ruby_version | awk '/^1\.3\.[0-3]/')" ] ; then
+ if [ -z "$(echo $rvm_ruby_version | awk '/^1\.2\.0/')" -a -z "$(echo $rvm_ruby_version | awk '/^1\.3\.[0-3]/')" ] ; then
__rvm_log "fail" "Unknown jRuby version: $rvm_ruby_version"
fi
alias jruby_ng="jruby --ng"
alias jruby_ng_server="jruby --ng-server"
;;
@@ -88,12 +88,18 @@
;;
default|system|current|user)
#no-op?
;;
+
*)
- __rvm_log "fail" "Ruby implementation '$rvm_ruby_interpreter' is not known."
+ if [ ! -z "$MY_RUBY_HOME" ] ; then
+ rvm_ruby_string=$(basename $MY_RUBY_HOME)
+ __rvm_select
+ else
+ __rvm_log "fail" "Ruby implementation '$rvm_ruby_interpreter' is not known."
+ fi
esac
if [ ! -z "$rvm_ruby_rev" ] ; then
if [ "$rvm_ruby_rev" = "head" -o "$rvm_ruby_rev" = "trunk" ] ; then
rvm_ruby_patch_level="head"
@@ -157,10 +163,10 @@
if [ -s $rvm_path/default ] ; then
source $rvm_path/default
else
rvm_ruby_interpreter="system"
- __rvm_log "error" "no default rvm specified, defaulting to pre-rvm sytem."
+ __rvm_log "warn" "no default rvm specified, defaulting to pre-rvm sytem."
unset GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION IRBRC
if [ -s $rvm_path/system ] ; then source $rvm_path/system ; fi
fi
elif [ "$rvm_ruby_interpreter" = "system" ] ; then