ruby-changes:60471
From: Yusuke <ko1@a...>
Date: Sun, 22 Mar 2020 22:35:44 +0900 (JST)
Subject: [ruby-changes:60471] 095e9f57af (master): test/ruby/test_m17n.rb: Add a temporal code for debugging
https://git.ruby-lang.org/ruby.git/commit/?id=095e9f57af From 095e9f57af30fc286ba66557d86f080003ab6d5a Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Sun, 22 Mar 2020 22:34:49 +0900 Subject: test/ruby/test_m17n.rb: Add a temporal code for debugging http://ci.rvm.jp/logfiles/brlog.trunk-test-random.20200322-221411 ``` I, [2020-03-22T22:15:50.761950 #23076] INFO -- : 1) Error: I, [2020-03-22T22:15:50.761963 #23076] INFO -- : TestM17N#test_object_inspect_external: I, [2020-03-22T22:15:50.761974 #23076] INFO -- : Encoding::CompatibilityError: incompatible character encodings: UTF-8 and UTF-16BE ``` diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index 6c7d0e6..c21f411 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -310,6 +310,36 @@ class TestM17N < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_m17n.rb#L310 def o.inspect "abc".encode(Encoding.default_external) end + + # debugging code for http://ci.rvm.jp/logfiles/brlog.trunk-test-random.20200322-221411 + begin + "abc".encode(Encoding.default_external) + rescue Encoding::CompatibilityError + p :debug_1 + p $! + p *$!.backtrace + p "abc".encoding + p Encoding.default_external + end + begin + [o].inspect + rescue Encoding::CompatibilityError + p :debug_2 + p $! + p *$!.backtrace + p "abc".encoding + p Encoding.default_external + begin + p o.inspect + p :debug_3 + rescue Encoding::CompatibilityError + p :debug_4 + p $! + p *$!.backtrace + end + end + # debugging code end + assert_equal '[abc]', [o].inspect Encoding.default_external = Encoding::US_ASCII -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/