зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Use .to_s once in the beginning to save allocations if it's a symbol.
https://github.com/rubygems/rubygems/commit/f8167db8a2
This commit is contained in:
Родитель
e921efa476
Коммит
598048e3dd
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче