ruby-changes:64658
From: Nobuyoshi <ko1@a...>
Date: Tue, 29 Dec 2020 17:45:38 +0900 (JST)
Subject: [ruby-changes:64658] 365df8d351 (master): transcode-tblgen.rb: send verbose messages to STDOUT
https://git.ruby-lang.org/ruby.git/commit/?id=365df8d351 From 365df8d351d3edee3cc383f008d87212079598c7 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 29 Dec 2020 15:57:42 +0900 Subject: transcode-tblgen.rb: send verbose messages to STDOUT diff --git a/tool/transcode-tblgen.rb b/tool/transcode-tblgen.rb index c6b58db..297882a 100644 --- a/tool/transcode-tblgen.rb +++ b/tool/transcode-tblgen.rb @@ -724,7 +724,7 @@ def citrus_decode_mapsrc(ces, csid, mapsrcs) https://github.com/ruby/ruby/blob/trunk/tool/transcode-tblgen.rb#L724 path = File.join(*path) path << ".src" path[path.rindex('/')] = '%' - STDERR.puts 'load mapsrc %s' % path if VERBOSE_MODE + STDOUT.puts 'load mapsrc %s' % path if VERBOSE_MODE open(path, 'rb') do |f| f.each_line do |l| break if /^BEGIN_MAP/ =~ l @@ -824,9 +824,9 @@ TRANSCODE_GENERATED_TRANSCODER_CODE = ''.dup https://github.com/ruby/ruby/blob/trunk/tool/transcode-tblgen.rb#L824 def transcode_tbl_only(from, to, map, valid_encoding=UnspecifiedValidEncoding) if VERBOSE_MODE if from.empty? || to.empty? - STDERR.puts "converter for #{from.empty? ? to : from}" + STDOUT.puts "converter for #{from.empty? ? to : from}" else - STDERR.puts "converter from #{from} to #{to}" + STDOUT.puts "converter from #{from} to #{to}" end end id_from = from.tr('^0-9A-Za-z', '_') @@ -905,7 +905,7 @@ End https://github.com/ruby/ruby/blob/trunk/tool/transcode-tblgen.rb#L905 end def transcode_generate_node(am, name_hint=nil) - STDERR.puts "converter for #{name_hint}" if VERBOSE_MODE + STDOUT.puts "converter for #{name_hint}" if VERBOSE_MODE am.gennode(TRANSCODE_GENERATED_BYTES_CODE, TRANSCODE_GENERATED_WORDS_CODE, name_hint) '' end @@ -1066,14 +1066,14 @@ if __FILE__ == $0 https://github.com/ruby/ruby/blob/trunk/tool/transcode-tblgen.rb#L1066 if old_signature == chk_signature now = Time.now File.utime(now, now, output_filename) - STDERR.puts "already up-to-date: #{output_filename}" if VERBOSE_MODE + STDOUT.puts "already up-to-date: #{output_filename}" if VERBOSE_MODE exit end end if VERBOSE_MODE if output_filename - STDERR.puts "generating #{output_filename} ..." + STDOUT.puts "generating #{output_filename} ..." end end @@ -1111,7 +1111,7 @@ if __FILE__ == $0 https://github.com/ruby/ruby/blob/trunk/tool/transcode-tblgen.rb#L1111 File.rename(new_filename, output_filename) tms = Process.times elapsed = Time.now - start_time - STDERR.puts "done. (#{'%.2f' % tms.utime}user #{'%.2f' % tms.stime}system #{'%.2f' % elapsed}elapsed)" if VERBOSE_MODE + STDOUT.puts "done. (#{'%.2f' % tms.utime}user #{'%.2f' % tms.stime}system #{'%.2f' % elapsed}elapsed)" if VERBOSE_MODE else print result end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/