summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-27 03:42:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-27 03:42:54 +0000
commit2092561366e45e398bbec6c4eea156598aa37f21 (patch)
tree6b8d43c6ab21f70127e7b6b10eecb82b95918746
parentc158fccd2b1213ac69846a5a832cc1a1d4f2d431 (diff)
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
-rw-r--r--tool/generic_erb.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/generic_erb.rb b/tool/generic_erb.rb
index 9e07f2f..6641b0e 100644
--- a/tool/generic_erb.rb
+++ b/tool/generic_erb.rb
@@ -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}