diff options
author | Samuel Giddins <[email protected]> | 2023-12-13 03:46:10 -0800 |
---|---|---|
committer | git <[email protected]> | 2023-12-13 22:00:26 +0000 |
commit | baf2ec2ca8127cd610a3681a1e84ebcb404fe8f2 (patch) | |
tree | 34f648186b45ea9a4927717d78528586d8848c80 /lib/bundler/source/git/git_proxy.rb | |
parent | b266890dab38d12ad52288d5edf60f885ae5b8ce (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/source/git/git_proxy.rb')
-rw-r--r-- | lib/bundler/source/git/git_proxy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb index 484a031835..8b6d420884 100644 --- a/lib/bundler/source/git/git_proxy.rb +++ b/lib/bundler/source/git/git_proxy.rb @@ -87,7 +87,7 @@ module Bundler def contains?(commit) allowed_with_path do result, status = git_null("branch", "--contains", commit, dir: path) - status.success? && result =~ /^\* (.*)$/ + status.success? && result.match?(/^\* (.*)$/) end end |