diff options
author | Josh Nichols <josh.nichols@gusto.com> | 2023-08-16 15:06:11 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-08-20 09:06:25 +0000 |
commit | e921efa476dc24246dcb40452fa1e9c02e75675d (patch) | |
tree | 82d1c3dfed1a7901188fc1b838315d19adf94a83 /lib/bundler/settings.rb | |
parent | 7cb6cbee953b8cf020e4e337bdbadd426460c71f (diff) | |
download | ruby-e921efa476dc24246dcb40452fa1e9c02e75675d.tar.gz |
[rubygems/rubygems] name is often a symbol, so only to_s once to avoid allocating it multiple times
https://github.com/rubygems/rubygems/commit/8eac49c429
Diffstat (limited to 'lib/bundler/settings.rb')
-rw-r--r-- | lib/bundler/settings.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb index 7cbe9fca1f..41b4b02f2d 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -340,7 +340,8 @@ module Bundler end def is_bool(name) - BOOL_KEYS.include?(name.to_s) || BOOL_KEYS.include?(parent_setting_for(name.to_s)) + name = name.to_s + BOOL_KEYS.include?(name) || BOOL_KEYS.include?(parent_setting_for(name)) end def is_string(name) |