ruby-changes:50104
From: nobu <ko1@a...>
Date: Mon, 5 Feb 2018 13:58:10 +0900 (JST)
Subject: [ruby-changes:50104] nobu:r62222 (trunk): transform_mjit_header.rb: no extra CRs
nobu 2018-02-05 13:58:04 +0900 (Mon, 05 Feb 2018) New Revision: 62222 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62222 Log: 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. Modified files: trunk/tool/transform_mjit_header.rb Index: tool/transform_mjit_header.rb =================================================================== --- tool/transform_mjit_header.rb (revision 62221) +++ tool/transform_mjit_header.rb (revision 62222) @@ -77,7 +77,7 @@ module MJITHeader https://github.com/ruby/ruby/blob/trunk/tool/transform_mjit_header.rb#L77 # 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/