summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-05 04:58:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-05 04:58:04 +0000
commit961569b95272b1a5034c2c4cbb777f92954e8f00 (patch)
tree209fe746fe2ee46eaa40979d266ea7d7bd09578a
parent8427fca49bd85205f5a8766292dd893f003c0e48 (diff)
transform_mjit_header.rb: no extra CRs
* tool/transform_mjit_header.rb (MJITHeader.check_code!): open temporary file in binary mode too, not to include extra CRs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--tool/transform_mjit_header.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/transform_mjit_header.rb b/tool/transform_mjit_header.rb
index d9744af343..dc5f9e11c1 100644
--- a/tool/transform_mjit_header.rb
+++ b/tool/transform_mjit_header.rb
@@ -77,7 +77,7 @@ module MJITHeader
# Return true if CC with CFLAGS compiles successfully the current code.
# Use STAGE in the message in case of a compilation failure
def self.check_code!(code, cc, cflags, stage)
- Tempfile.open(['', '.c']) do |f|
+ Tempfile.open(['', '.c'], mode: File::BINARY) do |f|
f.puts code
f.close
unless system("#{cc} #{cflags} #{f.path}", err: File::NULL)