diff --git a/scripts/cli b/scripts/cli index 3ad42e0362..e7c368cd38 100755 --- a/scripts/cli +++ b/scripts/cli @@ -554,18 +554,6 @@ __rvm_parse_args() else case "$rvm_token" in - jruby*|ree*|macruby*|rbx*|rubinius*|goruby|ironruby*|default*|maglev*|all) - if [[ "rubinius" = "$rvm_token" ]] ; then rvm_token="rbx"; fi - rvm_ruby_interpreter="$rvm_token" - rvm_ruby_string="$rvm_token" - rvm_ruby_strings="$rvm_token" - rvm_action="${rvm_action:-use}" - if match "$next_token" "[0-9].[0-9]*" ; then - rvm_ruby_version=$next_token - if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi - fi - ;; - *,*) rvm_ruby_strings="$rvm_token" if [[ -z "${rvm_action:-""}" ]] ; then @@ -603,6 +591,20 @@ __rvm_parse_args() rvm_action="${rvm_action:-use}" ;; + jruby*|ree*|macruby*|rbx*|rubinius*|goruby|ironruby*|default*|maglev*|all) + if [[ "rubinius" = "$rvm_token" ]] ; then rvm_token="rbx"; fi + rvm_ruby_interpreter="$rvm_token" + rvm_ruby_string="$rvm_token" + rvm_ruby_strings="$rvm_token" + rvm_action="${rvm_action:-use}" + + if match "$next_token" "[0-9].[0-9]*" ; then + rvm_ruby_version=$next_token + if [[ $# -gt 0 ]] ; then next_token="$1" ; shift ; else next_token="" ; fi + fi + ;; + + *.rb) # we have a specified ruby script rvm_ruby_args="$rvm_token" rvm_ruby_file="$rvm_token"