summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-24 19:38:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-24 19:38:22 +0000
commitd0cd67ef681dedae6c420bf77ed0f292d2e09c94 (patch)
tree1f52bb2ed59470cfaae130b0c908d877846bc155 /tool
parent058b9db42122a32b5a0ca77d63e403154a7c25f7 (diff)
* 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
Diffstat (limited to 'tool')
-rwxr-xr-xtool/make-snapshot13
1 files changed, 13 insertions, 0 deletions
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|