diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-07 02:30:57 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-07 02:30:57 +0000 |
commit | f1307d27054f0e6fca5936702f71b39d854fcb0c (patch) | |
tree | 74f9cf737b04cf38ae0238bafbeae57a134f9a52 /tool/rbinstall.rb | |
parent | 69310faab2b555c71e919fd27f711ede25cdb3a2 (diff) | |
download | ruby-f1307d27054f0e6fca5936702f71b39d854fcb0c.tar.gz |
* 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
Diffstat (limited to 'tool/rbinstall.rb')
-rwxr-xr-x | tool/rbinstall.rb | 11 |
1 files changed, 4 insertions, 7 deletions
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 |