From e921efa476dc24246dcb40452fa1e9c02e75675d Mon Sep 17 00:00:00 2001 From: Josh Nichols Date: Wed, 16 Aug 2023 15:06:11 -0400 Subject: [PATCH] [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 --- lib/bundler/settings.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)