mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* 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
This commit is contained in:
		
							parent
							
								
									058b9db421
								
							
						
					
					
						commit
						d0cd67ef68
					
				
					 2 changed files with 16 additions and 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.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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|
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue