diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-07 02:31:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-07 02:31:53 +0000 |
commit | 30e678a6fbcd8ca214f7285839ff96a23f600ebe (patch) | |
tree | c492f2c9334b3eceb8aee6591a1dfa343084d7fe | |
parent | 3d923277875dfe6b0a617582add91d628ca8d380 (diff) |
* instruby.rb (install-man): install mdocs directly without
temporary files. [ruby-dev:41204]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@27654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | instruby.rb | 11 |
2 files changed, 9 insertions, 7 deletions
@@ -1,3 +1,8 @@ +Fri May 7 11:31:50 2010 Nobuyoshi Nakada <[email protected]> + + * instruby.rb (install-man): install mdocs directly without + temporary files. [ruby-dev:41204] + Fri May 7 09:16:16 2010 Nobuyoshi Nakada <[email protected]> * ext/tk/extconf.rb (get_tclConfig_dirs): glob with EXEEXT. diff --git a/instruby.rb b/instruby.rb index d8464558c0..973d60996b 100755 --- a/instruby.rb +++ b/instruby.rb @@ -15,7 +15,6 @@ require 'fileutils' require 'shellwords' require 'optparse' require 'optparse/shellwords' -require 'tempfile' STDOUT.sync = true File.umask(0) @@ -448,13 +447,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 |