ruby-changes:15728
From: nobu <ko1@a...>
Date: Fri, 7 May 2010 11:31:16 +0900 (JST)
Subject: [ruby-changes:15728] Ruby:r27653 (trunk): * tool/rbinstall.rb (install-man): install mdocs directly without
nobu 2010-05-07 11:30:57 +0900 (Fri, 07 May 2010) New Revision: 27653 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27653 Log: * tool/rbinstall.rb (install-man): install mdocs directly without temporary files. [ruby-dev:41204] Modified files: trunk/ChangeLog trunk/tool/rbinstall.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 27652) +++ ChangeLog (revision 27653) @@ -1,3 +1,8 @@ +Fri May 7 11:30:51 2010 Nobuyoshi Nakada <nobu@r...> + + * tool/rbinstall.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: tool/rbinstall.rb =================================================================== --- tool/rbinstall.rb (revision 27652) +++ tool/rbinstall.rb (revision 27653) @@ -17,7 +17,6 @@ require 'shellwords' require 'optparse' require 'optparse/shellwords' -require 'tempfile' STDOUT.sync = true File.umask(0) @@ -483,13 +482,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/