aboutsummaryrefslogtreecommitdiffstats
path: root/tool/rbinstall.rb
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2020-05-26 14:00:51 -0700
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-27 07:47:50 +0900
commite0b40ef5d8173aff304c81f93516e1246e3c042c (patch)
treedba54aaba26b248ddf5e1470ef3089896f7b994e /tool/rbinstall.rb
parent962c302a1ae8e50738c36adb61c8ec9c9fa5a49b (diff)
downloadruby-e0b40ef5d8173aff304c81f93516e1246e3c042c.tar.gz
Don't convert bundler man pages from mdoc to man
These man pages are already in man format and assuming they are mdoc format breaks things. Fixes [Bug #16823]
Diffstat (limited to 'tool/rbinstall.rb')
-rwxr-xr-xtool/rbinstall.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index c91d4fff86..7d7dbd55f3 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -632,8 +632,13 @@ install?(:local, :comm, :man) do
class << (w = [])
alias print push
end
- open(mdoc) {|r| Mdoc2Man.mdoc2man(r, w)}
- w = w.join("")
+ if File.basename(mdoc).start_with?('bundle') ||
+ File.basename(mdoc).start_with?('gemfile')
+ w = File.read(mdoc)
+ else
+ open(mdoc) {|r| Mdoc2Man.mdoc2man(r, w)}
+ w = w.join("")
+ end
if compress
require 'tmpdir'
Dir.mktmpdir("man") {|d|