summaryrefslogtreecommitdiff
path: root/lib/bundler/cli.rb
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.rb
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.rb')
-rw-r--r--lib/bundler/cli.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index da5950917b..bf6e0fbec9 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -127,8 +127,8 @@ module Bundler
if man_pages.include?(command)
man_page = man_pages[command]
- if Bundler.which("man") && man_path !~ %r{^file:/.+!/META-INF/jruby.home/.+}
- Kernel.exec "man #{man_page}"
+ if Bundler.which("man") && !man_path.match?(%r{^file:/.+!/META-INF/jruby.home/.+})
+ Kernel.exec("man", man_page)
else
puts File.read("#{man_path}/#{File.basename(man_page)}.ronn")
end