diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2020-03-23 10:54:44 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2020-03-23 10:55:09 +0900 |
commit | 1d996fe72fc20fbc88f07b4b8d34b99aacc688f3 (patch) | |
tree | 3d5bbea15a3f5e76b95c7ec49ffde8a1c286433d /test/ruby | |
parent | c4e3d9e95390c934f7ebb185da69dad477183730 (diff) | |
download | ruby-1d996fe72fc20fbc88f07b4b8d34b99aacc688f3.tar.gz |
test/ruby/test_m17n.rb: Update the debugging code to get C stacktrace
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_m17n.rb | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index 321a356878..fee38357d7 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -315,28 +315,9 @@ class TestM17N < Test::Unit::TestCase begin "abc".encode(Encoding.default_external) rescue Encoding::CompatibilityError - $stderr.puts :debug_1.inspect - $stderr.puts $!.inspect - $stderr.puts *$!.backtrace - $stderr.puts "abc".encoding.inspect - $stderr.puts Encoding.default_external.inspect - end - begin - [o].inspect - rescue Encoding::CompatibilityError - $stderr.puts :debug_2.inspect - $stderr.puts $!.inspect - $stderr.puts *$!.backtrace - $stderr.puts "abc".encoding.inspect - $stderr.puts Encoding.default_external.inspect - begin - $stderr.puts o.inspect.inspect - $stderr.puts :debug_3.inspect - rescue Encoding::CompatibilityError - $stderr.puts :debug_4.inspect - $stderr.puts $!.inspect - $stderr.puts *$!.backtrace - end + TracePoint.new(:raise) do |tp| + Process.kill(:SEGV, $$) + end.enable { "abc".encode(Encoding.default_external) } end # debugging code end |