scripts/gemsets in rvm-1.0.9 vs scripts/gemsets in rvm-1.0.10
- old
+ new
@@ -213,12 +213,18 @@
return 0
}
gemset_delete() {
+ gemsets=(${args[@]})
+
if [[ ${rvm_ruby_selected_flag:-0} -eq 0 ]] ; then __rvm_select ; fi
+ if [[ -n "${gemsets[__array_start]}" ]] ; then
+ rvm_gemset_name="${gemsets[__array_start]}"
+ fi
+
if [[ -n "$rvm_gemset_name" ]] ; then
gemdir="${rvm_gems_path:-"$rvm_path/gems"}/$rvm_ruby_string${rvm_gemset_separator:-"@"}$rvm_gemset_name"
if [[ -d "$gemdir" && "$gemdir" != '/' && ${rvm_force_flag:-0} -gt 0 ]] ; then
@@ -808,11 +814,12 @@
"'gem' was not found, cannot perform gem actions (Do you have an RVM ruby selected?)"
exit 1
fi
args=($*)
-action="${args[0]}"
-args=($(echo ${args[@]:1}))
+action="${args[$__array_start]}"
+args[$__array_start]=""
+args=(${args[@]})
gems_args="$(echo ${args[@]}) " # Strip trailing / leading / extra spacing.
export rvm_gemset_name="${args[1]:-""}" # For wherever used.
rvm_sticky_flag=1