ruby-changes:61138
From: David <ko1@a...>
Date: Fri, 8 May 2020 14:15:00 +0900 (JST)
Subject: [ruby-changes:61138] a453f26b0d (master): [rubygems/rubygems] Extract a local variable
https://git.ruby-lang.org/ruby.git/commit/?id=a453f26b0d From a453f26b0d47070c661baf7e302469cd8ab486ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Mon, 27 Apr 2020 22:58:35 +0200 Subject: [rubygems/rubygems] Extract a local variable https://github.com/rubygems/rubygems/commit/445c9da2ac diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 3ef0e28..d0398c7 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -130,10 +130,11 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli.rb#L130 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") -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/