summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xtool/rbinstall.rb11
2 files changed, 9 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d1824e664..77c55f9b82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri May 7 11:30:51 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * tool/rbinstall.rb (install-man): install mdocs directly without
+ temporary files. [ruby-dev:41204]
+
Fri May 7 09:16:16 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/tk/extconf.rb (get_tclConfig_dirs): glob with EXEEXT.
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