From f1307d27054f0e6fca5936702f71b39d854fcb0c Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 7 May 2010 02:30:57 +0000 Subject: * tool/rbinstall.rb (install-man): install mdocs directly without temporary files. [ruby-dev:41204] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/rbinstall.rb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'tool/rbinstall.rb') diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 845efcb73f..adbe691cf9 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -17,7 +17,6 @@ require 'fileutils' require 'shellwords' require 'optparse' require 'optparse/shellwords' -require 'tempfile' STDOUT.sync = true File.umask(0) @@ -483,13 +482,11 @@ install?(:local, :comm, :man) do if $mantype == "doc" install mdoc, destfile, :mode => $data_mode else - w = nil - Tempfile.open(base) do |f| - w = f - open(mdoc) {|r| Mdoc2Man.mdoc2man(r, w)} + class << (w = []) + alias print push end - install w.path, destfile, :mode => $data_mode - w.close! + open(mdoc) {|r| Mdoc2Man.mdoc2man(r, w)} + open_for_install(destfile, $data_mode) {w.join("")} end end end -- cgit v1.2.3