summaryrefslogtreecommitdiff
path: root/lib/bundler/cli
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2023-12-13 03:46:10 -0800
committergit <svn-admin@ruby-lang.org>2023-12-13 22:00:26 +0000
commitbaf2ec2ca8127cd610a3681a1e84ebcb404fe8f2 (patch)
tree34f648186b45ea9a4927717d78528586d8848c80 /lib/bundler/cli
parentb266890dab38d12ad52288d5edf60f885ae5b8ce (diff)
[rubygems/rubygems] Use match? when regexp match data is unused
Improved performance / reduced allocations https://github.com/rubygems/rubygems/commit/b04726c9a7
Diffstat (limited to 'lib/bundler/cli')
-rw-r--r--lib/bundler/cli/common.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/cli/common.rb b/lib/bundler/cli/common.rb
index 0cf85c1d8d..dc2a889d2b 100644
--- a/lib/bundler/cli/common.rb
+++ b/lib/bundler/cli/common.rb
@@ -54,7 +54,7 @@ module Bundler
Bundler.definition.specs.each do |spec|
return spec if spec.name == name
- specs << spec if regexp && spec.name =~ regexp
+ specs << spec if regexp && spec.name.match?(regexp)
end
default_spec = default_gem_spec(name)