summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-04-27 22:58:35 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-08 14:13:29 +0900
commita453f26b0d47070c661baf7e302469cd8ab486ad (patch)
tree7f9a701efc69ba25c05b8022853d28faab576084
parentece1690105b9e2887eeab36f67ad414049137ae2 (diff)
[rubygems/rubygems] Extract a local variable
https://github.com/rubygems/rubygems/commit/445c9da2ac
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3092
-rw-r--r--lib/bundler/cli.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 3ef0e28f26..d0398c712d 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -130,10 +130,11 @@ module Bundler
end]
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_pages[command]}"
+ Kernel.exec "man #{man_page}"
else
- puts File.read("#{man_path}/#{File.basename(man_pages[command])}.txt")
+ puts File.read("#{man_path}/#{File.basename(man_page)}.txt")
end
elsif command_path = Bundler.which("bundler-#{cli}")
Kernel.exec(command_path, "--help")