diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-04-27 22:58:35 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-05-08 14:13:29 +0900 |
commit | a453f26b0d47070c661baf7e302469cd8ab486ad (patch) | |
tree | 7f9a701efc69ba25c05b8022853d28faab576084 /lib | |
parent | ece1690105b9e2887eeab36f67ad414049137ae2 (diff) | |
download | ruby-a453f26b0d47070c661baf7e302469cd8ab486ad.tar.gz |
[rubygems/rubygems] Extract a local variable
https://github.com/rubygems/rubygems/commit/445c9da2ac
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/cli.rb | 5 |
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") |