Feature #578 » add_disassemble_proc.diff
iseq.c (working copy) | ||
---|---|---|
return ret;
|
||
}
|
||
static VALUE
|
||
iseq_s_disasm_proc(VALUE klass, VALUE proc)
|
||
{
|
||
VALUE ret = Qnil;
|
||
rb_proc_t *proc_pointer;
|
||
GetProcPtr(proc, proc_pointer);
|
||
VALUE iseqval = (VALUE) proc_pointer->block.iseq->self;
|
||
if (RUBY_VM_NORMAL_ISEQ_P(iseqval))
|
||
ret = ruby_iseq_disasm(iseqval);
|
||
return ret;
|
||
}
|
||
|
||
const char *
|
||
ruby_node_name(int node)
|
||
{
|
||
... | ... | |
rb_define_singleton_method(rb_cISeq, "compile_option=", iseq_s_compile_option_set, 1);
|
||
rb_define_singleton_method(rb_cISeq, "disasm", iseq_s_disasm, 1);
|
||
rb_define_singleton_method(rb_cISeq, "disassemble", iseq_s_disasm, 1);
|
||
rb_define_singleton_method(rb_cISeq, "disassemble_proc", iseq_s_disasm_proc, 1);
|
||
}
|
||