From 588d10180fbf05228aec2882f74dd3236dd3ad01 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 9 Jun 2012 08:21:52 +0000 Subject: iseq.c: fix conversion * iseq.c (iseq_load): type is a symbol, and invalid as ID in common. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_iseq.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index 2b25630e57..2fa8f2399a 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -8,4 +8,11 @@ class TestISeq < Test::Unit::TestCase bug5894 = '[ruby-dev:45130]' assert_normal_exit('p RubyVM::InstructionSequence.compile("1", "mac", "", 0).to_a', bug5894) end + + def test_unsupport_type + ary = RubyVM::InstructionSequence.compile("p").to_a + ary[9] = :foobar + e = assert_raise(TypeError) {RubyVM::InstructionSequence.load(ary)} + assert_match(/:foobar/, e.message) + end if defined?(RubyVM::InstructionSequence.load) end -- cgit v1.2.3