From 598048e3ddfc0dec301a4574af8d945cddee5e76 Mon Sep 17 00:00:00 2001 From: Josh Nichols Date: Wed, 16 Aug 2023 15:07:31 -0400 Subject: [PATCH] [rubygems/rubygems] Use .to_s once in the beginning to save allocations if it's a symbol. https://github.com/rubygems/rubygems/commit/f8167db8a2 --- 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 41b4b02f2d..e66e2d572f 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -345,7 +345,8 @@ module Bundler end def is_string(name) - STRING_KEYS.include?(name.to_s) || name.to_s.start_with?("local.") || name.to_s.start_with?("mirror.") || name.to_s.start_with?("build.") + name = name.to_s + STRING_KEYS.include?(name) || name.start_with?("local.") || name.start_with?("mirror.") || name.start_with?("build.") end def to_bool(value)