aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_iseq.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_iseq.rb')
-rw-r--r--test/ruby/test_iseq.rb7
1 files changed, 7 insertions, 0 deletions
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