aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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 4af440ae42..686646ddd8 100644
--- a/test/ruby/test_iseq.rb
+++ b/test/ruby/test_iseq.rb
@@ -134,4 +134,11 @@ class TestISeq < Test::Unit::TestCase
assert(!op.to_s.match(/^opt_/), "#{op}")
}
end
+
+ def test_invalid_source
+ bug11159 = '[ruby-core:69219] [Bug #11159]'
+ assert_raise(TypeError, bug11159) {ISeq.compile(nil)}
+ assert_raise(TypeError, bug11159) {ISeq.compile(:foo)}
+ assert_raise(TypeError, bug11159) {ISeq.compile(1)}
+ end
end