diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-07 16:23:20 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-07 16:23:20 +0000 |
commit | 0f408e10bab2a3831560beedb4e4424869330d88 (patch) | |
tree | f7dbbbcdaab1f118424ec84254a7b3db4e5f8400 /iseq.c | |
parent | 8d79d61202b16dcc5594f24fdb2ff20893c51311 (diff) | |
download | ruby-0f408e10bab2a3831560beedb4e4424869330d88.tar.gz |
* iseq.c (iseq_s_disasm): accept proc objects. [ruby-core:18762]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1011,6 +1011,15 @@ iseq_s_disasm(VALUE klass, VALUE body) if ((iseq = rb_method_get_iseq(body)) != 0) { ret = rb_iseq_disasm(iseq->self); } + else { + 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); + } + } return ret; } |