mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
transform_mjit_header.rb: read/write in binmode
* tool/transform_mjit_header.rb: read and write as ASCII-8BIT to make single-byte-optimizable always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
70ae83f8e1
commit
3f45bbfe0e
1 changed files with 2 additions and 2 deletions
|
@ -104,7 +104,7 @@ module MJITHeader
|
|||
|
||||
def self.write(code, out)
|
||||
FileUtils.mkdir_p(File.dirname(out))
|
||||
File.write("#{out}.new", code)
|
||||
File.binwrite("#{out}.new", code)
|
||||
FileUtils.mv("#{out}.new", out)
|
||||
end
|
||||
|
||||
|
@ -119,7 +119,7 @@ if ARGV.size != 3
|
|||
end
|
||||
|
||||
cc = ARGV[0]
|
||||
code = File.read(ARGV[1]) # Current version of the header file.
|
||||
code = File.binread(ARGV[1]) # Current version of the header file.
|
||||
outfile = ARGV[2]
|
||||
if cc =~ /\Acl(\z| |\.exe)/
|
||||
cflags = '-DMJIT_HEADER -Zs'
|
||||
|
|
Loading…
Reference in a new issue