diff options
author | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-20 04:31:20 +0000 |
---|---|---|
committer | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-20 04:31:20 +0000 |
commit | aef5decf8bceb26b49870b464c8bd61a909d78fb (patch) | |
tree | d6e1171834f5602ccad0d6c8a178c4ee1bbb6e1e /iseq.c | |
parent | c2de9428c3e70e64e6716d5428d55d32adffe82d (diff) |
* backport r33013 from trunk.
* iseq.c (iseq_s_disasm): fix a bug that may cause SEGV.
* test/ruby/test_method.rb (test_body): add a test for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1030,9 +1030,9 @@ iseq_s_disasm(VALUE klass, VALUE body) rb_proc_t *proc; VALUE iseqval; GetProcPtr(body, proc); - iseqval = proc->block.iseq->self; - if (RUBY_VM_NORMAL_ISEQ_P(iseqval)) { - ret = rb_iseq_disasm(iseqval); + iseq = proc->block.iseq; + if (RUBY_VM_NORMAL_ISEQ_P(iseq)) { + ret = rb_iseq_disasm(iseq->self); } } else if ((iseq = rb_method_get_iseq(body)) != 0) { |