From 93b6f8d6195564d0884ee00f536a951f4c26288c Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 8 Aug 2012 07:52:19 +0000 Subject: * 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 --- test/ruby/test_exception.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test/ruby/test_exception.rb') diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index c49bd51064..93b24bbdd5 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -431,4 +431,24 @@ end.join ensure t.close(true) if t end + + Bug4438 = '[ruby-core:35364]' + + def test_rescue_single_argument + assert_raise(TypeError, Bug4438) do + begin + raise + rescue 1 + end + end + end + + def test_rescue_splat_argument + assert_raise(TypeError, Bug4438) do + begin + raise + rescue *Array(1) + end + end + end end -- cgit v1.2.3