[前][次][番号順一覧][スレッド一覧]

ruby-changes:50628

From: nobu <ko1@a...>
Date: Sat, 17 Mar 2018 11:18:50 +0900 (JST)
Subject: [ruby-changes:50628] nobu:r62788 (trunk): transform_mjit_header.rb: read output and errors

nobu	2018-03-17 11:18:46 +0900 (Sat, 17 Mar 2018)

  New Revision: 62788

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62788

  Log:
    transform_mjit_header.rb: read output and errors
    
    * tool/transform_mjit_header.rb (MJITHeader.check_code): read
      output and errors than discarding errors.  also cl.exe prints
      the source file name which is a garbage at this time.

  Modified files:
    trunk/tool/transform_mjit_header.rb
Index: tool/transform_mjit_header.rb
===================================================================
--- tool/transform_mjit_header.rb	(revision 62787)
+++ tool/transform_mjit_header.rb	(revision 62788)
@@ -114,8 +114,8 @@ module MJITHeader https://github.com/ruby/ruby/blob/trunk/tool/transform_mjit_header.rb#L114
   def self.check_code!(code, cc, cflags, stage)
     with_code(code) do |path|
       cmd = "#{cc} #{cflags} #{path}"
-      unless system(cmd, err: File::NULL)
-        out = IO.popen(cmd, err: [:child, :out], &:read)
+      out = IO.popen(cmd, err: [:child, :out], &:read)
+      unless $?.success?
         STDERR.puts "error in #{stage} header file:\n#{out}"
         exit false
       end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]