diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-22 00:02:59 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-22 00:02:59 +0000 |
commit | 05aa1a78ac8e11a7378c426b8b991f02d3909681 (patch) | |
tree | 10929e2c0406f92fec7ad5656058f2f909688ed8 /test/ruby | |
parent | 69922c58dc8ccc687d00f6b4c5a67fd33aec9ec8 (diff) | |
download | ruby-05aa1a78ac8e11a7378c426b8b991f02d3909681.tar.gz |
iseq.c: undef allocator
* iseq.c (Init_ISeq): undefine allocator of InstructionSequence,
to get rid of segfaults at method call on uninitialized object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_iseq.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index cdfa380edd..94aebe1f90 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -19,6 +19,10 @@ class TestISeq < Test::Unit::TestCase body.find_all{|e| e.kind_of? Integer} end + def test_allocate + assert_raise(TypeError) {ISeq.allocate} + end + def test_to_a_lines src = <<-EOS p __LINE__ # 1 |