scripts/utility in rvm-0.0.89 vs scripts/utility in rvm-0.0.90

- old
+ new

@@ -129,11 +129,11 @@ unset log_file command } __rvm_cleanup_variables() { __rvm_unset_ruby_variables - unset rvm_action rvm_irbrc_file rvm_command rvm_error_message rvm_gem_set_name rvm_url rvm_force_flag rvm_all_flag rvm_reconfigure_flag rvm_make_flags rvm_bin_flag rvm_load_flag rvm_dump_flag rvm_self_flag rvm_gem_flag rvm_rubygems_flag rvm_debug_flag rvm_delete_flag rvm_summary_flag rvm_test_flag _rvm_spec_flag rvm_json_flag rvm_yaml_flag rvm_shebang_flag rvm_env_flag rvm_tail_flag rvm_use_flag rvm_dir_flag rvm_list_flag rvm_empty_flag rvm_file_name rvm_benchmark_flag rvm_clear_flag rvm_name_flag rvm_verbose_flag rvm_user_flag rvm_system_flag rvm_ruby_configure_flags + unset rvm_action rvm_irbrc_file rvm_command rvm_error_message rvm_gem_set_name rvm_url rvm_force_flag rvm_all_flag rvm_reconfigure_flag rvm_make_flags rvm_bin_flag rvm_load_flag rvm_dump_flag rvm_self_flag rvm_gem_flag rvm_rubygems_flag rvm_debug_flag rvm_delete_flag rvm_summary_flag rvm_test_flag _rvm_spec_flag rvm_json_flag rvm_yaml_flag rvm_shebang_flag rvm_env_flag rvm_tail_flag rvm_use_flag rvm_dir_flag rvm_list_flag rvm_empty_flag rvm_file_name rvm_benchmark_flag rvm_clear_flag rvm_name_flag rvm_verbose_flag rvm_user_flag rvm_system_flag rvm_ruby_configure_flags rvm_uninstall_flag rvm_install_flag } __rvm_unset_ruby_variables() { unset rvm_ruby_interpreter rvm_ruby_version rvm_url rvm_ruby_repo_url rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_make rvm_ruby_make_install rvm_ruby_revision rvm_ruby_tag rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_ruby_binary rvm_ruby_home rvm_ruby_log_path rvm_ruby_src_path rvm_ruby_irbrc rvm_ruby_selected_flag rvm_ruby_string rvm_ruby_string rvm_ruby_src_path rvm_ruby_repo_url rvm_major_version rvm_minor_version rvm_ruby_gem_home rvm_head_flag rvm_ruby_configure rvm_ruby_mode rvm_ruby_patch rvm_ruby_package_file rvm_ruby_package_name } @@ -679,11 +679,21 @@ rvm_ruby_gem_home="$rvm_gem_path/$rvm_ruby_interpreter/$rvm_ruby_version%$rvm_gem_set_name" fi } __rvm_gems_use() { - mkdir -p "$rvm_ruby_gem_home" - GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME - GEM_PATH="$GEM_HOME" ; export GEM_PATH - __rvm_use + if [[ -z "$rvm_ruby_selected_flag" ]] ; then __rvm_select $* ; fi + + if [[ ! -z "$rvm_ruby_gem_home" ]] ; then + mkdir -p "$rvm_ruby_gem_home" + GEM_HOME="$rvm_ruby_gem_home" ; export GEM_HOME + GEM_PATH="$GEM_HOME" ; export GEM_PATH + __rvm_use + fi +} + +__rvm_gems_clear() { + unset rvm_ruby_gem_home rvm_gem_set_name GEM_HOME GEM_PATH + __rvm_gems_select + __rvm_gems_use }