mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	generic_erb.rb: read in binary mode
* tool/generic_erb.rb: read existing file in binary mode to convert nothing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									c158fccd2b
								
							
						
					
					
						commit
						2092561366
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -24,7 +24,7 @@ erb = ERB.new(File.read(template), nil, '%-')
 | 
			
		|||
erb.filename = template
 | 
			
		||||
result = source ? erb.src : erb.result
 | 
			
		||||
if output
 | 
			
		||||
  if ifchange and (vpath.open(output) {|f| f.read} rescue nil) == result
 | 
			
		||||
  if ifchange and (vpath.open(output, "rb") {|f| f.read} rescue nil) == result
 | 
			
		||||
    puts "#{output} unchanged"
 | 
			
		||||
  else
 | 
			
		||||
    open(output, "wb") {|f| f.print result}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue