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
This commit is contained in:
nobu 2018-02-05 04:58:04 +00:00
Родитель 8427fca49b
Коммит 961569b952
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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)