summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2020-03-23 10:54:44 +0900
committerYusuke Endoh <mame@ruby-lang.org>2020-03-23 10:55:09 +0900
commit1d996fe72fc20fbc88f07b4b8d34b99aacc688f3 (patch)
tree3d5bbea15a3f5e76b95c7ec49ffde8a1c286433d /test/ruby
parentc4e3d9e95390c934f7ebb185da69dad477183730 (diff)
downloadruby-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.rb25
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