HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/scripts/functions/reset
#!/usr/bin/env bash

# Reset any rvm gathered information about the system and its state.
# rvm will refresh the stored information the next time it is called after reset.
__rvm_reset()
{
  \typeset flag flags file files config configs variable

  __rvm_remove_rvm_from_path ; __rvm_conditionally_add_bin_path

  export PATH

  builtin hash -r

  flags=( default passenger editor )

  for flag in "${flags[@]}"; do

    \command \rm -f "${rvm_bin_path}"/${flag}_*

  done

  for file in system default ; do

    if [[ -f "$rvm_path/${file}" ]] ; then
      \command \rm -f "$rvm_path/${file}"
    fi

    if [[ -f "$rvm_path/config/${file}" ]] ; then
      \command \rm -f "$rvm_path/config/${file}"
    fi

    if [[ -f "$rvm_environments_path/${file}" ]] ; then
      \command \rm -f "$rvm_environments_path/${file}"
    fi

  done

  # Go back to a clean state.
  __rvm_use_system

  __rvm_unset_ruby_variables

  __rvm_unset_exports

  configs=(system_ruby system_gem_path system_user_gem_path)

  for system_config in "${configs[@]}"
  do
    __rvm_db_ "$rvm_user_path/db" "$system_config" "delete"
  done

  files=(ruby gem rake irb $(__rvm_cd "${rvm_bin_path}" ; \
    __rvm_find . -mindepth 1 -maxdepth 1 -iname 'default*' -type f \
    | __rvm_sed -e 's#./##g'))

  for file in "${files[@]}"; do

    if [[ -f "${rvm_bin_path}/$file" ]] ; then

      \command \rm -f "${rvm_bin_path}/$file"

    fi

  done

  return 0
}