Method: RubyVM::InstructionSequence#disassemble
- Defined in:
- iseq.c
#disasm ⇒ String #disassemble ⇒ String
Returns the instruction sequence as a String in human readable form.
puts RubyVM::InstructionSequence.compile('1 + 2').disasm
Produces:
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 leave
2936 2937 2938 2939 2940 |
# File 'iseq.c', line 2936
static VALUE
iseqw_disasm(VALUE self)
{
return rb_iseq_disasm(iseqw_check(self));
}
|