aboutsummaryrefslogtreecommitdiffstats
path: root/iseq.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-22 00:02:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-22 00:02:59 +0000
commit05aa1a78ac8e11a7378c426b8b991f02d3909681 (patch)
tree10929e2c0406f92fec7ad5656058f2f909688ed8 /iseq.c
parent69922c58dc8ccc687d00f6b4c5a67fd33aec9ec8 (diff)
downloadruby-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 'iseq.c')
-rw-r--r--iseq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/iseq.c b/iseq.c
index 93be1ed956..b6b31c052f 100644
--- a/iseq.c
+++ b/iseq.c
@@ -2419,6 +2419,7 @@ Init_ISeq(void)
{
/* declare ::RubyVM::InstructionSequence */
rb_cISeq = rb_define_class_under(rb_cRubyVM, "InstructionSequence", rb_cObject);
+ rb_undef_alloc_func(rb_cISeq);
rb_define_method(rb_cISeq, "inspect", iseqw_inspect, 0);
rb_define_method(rb_cISeq, "disasm", iseqw_disasm, 0);
rb_define_method(rb_cISeq, "disassemble", iseqw_disasm, 0);