[rubygems/rubygems] String#start_with? is faster than regex with beginning boundaries

https://github.com/rubygems/rubygems/commit/d7cde68034
This commit is contained in:
Josh Nichols 2023-08-16 15:05:39 -04:00 committed by git
parent b97e45d01a
commit 7cb6cbee95

View File

@ -161,7 +161,7 @@ module Bundler
def local_overrides
repos = {}
all.each do |k|
repos[$'] = self[k] if k =~ /^local\./
repos[$'] = self[k] if k.start_with?("local.")
end
repos
end