mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_settracefunc.rb (test_raise): reveal an exception
hided by rescue modifier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4b60da90f9
commit
32c8d5c411
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Jun 30 22:57:50 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* test/ruby/test_settracefunc.rb (test_raise): reveal an exception
|
||||
hided by rescue modifier.
|
||||
|
||||
Mon Jun 30 22:49:32 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* test/ruby/test_array.rb (test_aset): access with too big index
|
||||
|
|
|
@ -10,6 +10,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def teardown
|
||||
set_trace_func(nil)
|
||||
RubyVM::InstructionSequence.compile_option = @original_compile_option
|
||||
end
|
||||
|
||||
|
@ -134,8 +135,11 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
|||
1: set_trace_func(Proc.new { |event, file, lineno, mid, binding, klass|
|
||||
2: events << [event, lineno, mid, klass]
|
||||
3: })
|
||||
4: raise "error" rescue nil
|
||||
5: set_trace_func(nil)
|
||||
4: begin
|
||||
5: raise TypeError, "error"
|
||||
6: rescue TypeError
|
||||
7: end
|
||||
8: set_trace_func(nil)
|
||||
EOF
|
||||
assert_equal(["c-return", 3, :set_trace_func, Kernel],
|
||||
events.shift)
|
||||
|
|
Loading…
Reference in a new issue