diff options
author | Josh Nichols <josh.nichols@gusto.com> | 2023-08-16 15:07:31 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-08-20 09:06:31 +0000 |
commit | 598048e3ddfc0dec301a4574af8d945cddee5e76 (patch) | |
tree | 37919d7c8e7ee52e7040cfbb30f2e99c81620365 /lib/bundler/settings.rb | |
parent | e921efa476dc24246dcb40452fa1e9c02e75675d (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.rb | 3 |
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) |