mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* compile.c, insns.def (checkmatch):
remove checkincludearray instruction and add new instruction checkmatch. This change is to solve [Bug #4438] "rescue args type check omitted". * iseq.c: increment ISEQ_MAJOR_VERSION because removal of checkincludearray instruction. * vm_core.h: add several definitions for the checkmatch instruction. * vm_insnhelper.c (check_match): added. * bootstraptest/test_exception.rb: add a test. * test/ruby/test_exception.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8637eac406
commit
93b6f8d619
8 changed files with 132 additions and 55 deletions
|
@ -414,3 +414,18 @@ assert_equal 'exception class/object expected', %q{
|
|||
e.message
|
||||
end
|
||||
}, '[ruby-core:24767]'
|
||||
|
||||
assert_equal 'ok', %q{
|
||||
class C
|
||||
def ===(o)
|
||||
true
|
||||
end
|
||||
end
|
||||
begin
|
||||
begin
|
||||
rescue C.new
|
||||
end
|
||||
rescue TypeError
|
||||
:ok
|
||||
end
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue