summaryrefslogtreecommitdiff
path: root/lib/bundler/settings.rb
diff options
context:
space:
mode:
authorJosh Nichols <josh.nichols@gusto.com>2023-08-16 15:07:31 -0400
committergit <svn-admin@ruby-lang.org>2023-08-20 09:06:31 +0000
commit598048e3ddfc0dec301a4574af8d945cddee5e76 (patch)
tree37919d7c8e7ee52e7040cfbb30f2e99c81620365 /lib/bundler/settings.rb
parente921efa476dc24246dcb40452fa1e9c02e75675d (diff)
[rubygems/rubygems] Use .to_s once in the beginning to save allocations if it's a symbol.
https://github.com/rubygems/rubygems/commit/f8167db8a2
Diffstat (limited to 'lib/bundler/settings.rb')
-rw-r--r--lib/bundler/settings.rb3
1 files changed, 2 insertions, 1 deletions
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)