ruby-changes:50971
From: mame <ko1@a...>
Date: Tue, 17 Apr 2018 17:48:03 +0900 (JST)
Subject: [ruby-changes:50971] mame:r63179 (trunk): The test for TracePoint#raised_exception had never worked correctly
mame 2018-04-17 17:47:56 +0900 (Tue, 17 Apr 2018) New Revision: 63179 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63179 Log: The test for TracePoint#raised_exception had never worked correctly Modified files: trunk/test/ruby/test_settracefunc.rb Index: test/ruby/test_settracefunc.rb =================================================================== --- test/ruby/test_settracefunc.rb (revision 63178) +++ test/ruby/test_settracefunc.rb (revision 63179) @@ -729,13 +729,13 @@ class TestSetTraceFunc < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L729 end def test_tracepoint_raised_exception - trace = TracePoint.new(:call, :return){|tp| + trace = TracePoint.new(:call, :return, :raise){|tp| next if !target_thread? case tp.event when :call, :return assert_raise(RuntimeError) { tp.raised_exception } when :raise - assert_equal(XYZZYError, tp.raised_exception) + assert_kind_of(XYZZYException, tp.raised_exception) end } trace.enable{ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/