ruby-changes:15729
From: nobu <ko1@a...>
Date: Fri, 7 May 2010 11:32:05 +0900 (JST)
Subject: [ruby-changes:15729] Ruby:r27654 (ruby_1_8): * instruby.rb (install-man): install mdocs directly without
nobu 2010-05-07 11:31:53 +0900 (Fri, 07 May 2010) New Revision: 27654 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27654 Log: * instruby.rb (install-man): install mdocs directly without temporary files. [ruby-dev:41204] Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/instruby.rb Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 27653) +++ ruby_1_8/ChangeLog (revision 27654) @@ -1,3 +1,8 @@ +Fri May 7 11:31:50 2010 Nobuyoshi Nakada <nobu@r...> + + * instruby.rb (install-man): install mdocs directly without + temporary files. [ruby-dev:41204] + Fri May 7 09:16:16 2010 Nobuyoshi Nakada <nobu@r...> * ext/tk/extconf.rb (get_tclConfig_dirs): glob with EXEEXT. Index: ruby_1_8/instruby.rb =================================================================== --- ruby_1_8/instruby.rb (revision 27653) +++ ruby_1_8/instruby.rb (revision 27654) @@ -15,7 +15,6 @@ require 'shellwords' require 'optparse' require 'optparse/shellwords' -require 'tempfile' STDOUT.sync = true File.umask(0) @@ -448,13 +447,11 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/