disasm 2

iseq.disasm â str
Instance Public methods

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
doc_ruby_on_rails
2015-05-13 20:58:33
Comments
Leave a Comment

Please login to continue.