[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
This commit is contained in:
Josh Nichols 2023-08-16 15:06:11 -04:00 committed by git
parent 7cb6cbee95
commit e921efa476

View File

@ -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)