diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-24 19:38:22 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-03-24 19:38:22 +0000 |
commit | d0cd67ef681dedae6c420bf77ed0f292d2e09c94 (patch) | |
tree | 1f52bb2ed59470cfaae130b0c908d877846bc155 | |
parent | 058b9db42122a32b5a0ca77d63e403154a7c25f7 (diff) | |
download | ruby-d0cd67ef681dedae6c420bf77ed0f292d2e09c94.tar.gz |
* tool/make-snapshot (Dir.mktmpdir): for 1.8.6 backward compatibility.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rwxr-xr-x | tool/make-snapshot | 13 |
2 files changed, 16 insertions, 1 deletions
@@ -1,4 +1,6 @@ -Thu Mar 25 04:36:47 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> +Thu Mar 25 04:38:16 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * tool/make-snapshot (Dir.mktmpdir): for 1.8.6 backward compatibility. * tool/make-snapshot (package): $: no longer contains ".", in trunk. diff --git a/tool/make-snapshot b/tool/make-snapshot index 3d463752cd..7057733696 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -28,6 +28,19 @@ class String alias bytesize size unless method_defined?(:bytesize) end +class Dir + def self.mktmpdir(path) + path = File.join(tmpdir, path+"-#{$$}-#{rand(100000)}") + begin + mkdir(path) + rescue Errno::EEXIST + path.succ! + retry + end + path + end unless respond_to?(:mktmpdir) +end + $patch_file &&= File.expand_path($patch_file) path = ENV["PATH"].split(File::PATH_SEPARATOR) %w[YACC BASERUBY RUBY MV MINIRUBY].each do |var| |