1
0
mirror of https://github.com/meineerde/dotfiles.git synced 2025-10-17 19:41:01 +00:00

Add --disable-gems for Ruby version fallback to save 60-100ms

This commit is contained in:
Holger Just 2022-07-26 11:23:57 +02:00
parent 318328ffa8
commit af48476c5a

View File

@ -196,7 +196,7 @@ __prompt_ruby_version() {
elif [[ -n "$RUBY_ROOT" ]]; then
local ruby_version="$(basename "$RUBY_ROOT")"
elif type ruby > /dev/null 2>&1; then
local ruby_version="$(ruby -e "puts defined?(RUBY_ENGINE_VERSION) ? \"#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}\" : \"ruby-#{RUBY_VERSION}\"")"
local ruby_version="$(ruby --disable-gems -e "puts defined?(RUBY_ENGINE_VERSION) ? \"#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}\" : \"ruby-#{RUBY_VERSION}\"")"
else
local ruby_version=''
fi