Created
July 24, 2013 19:00
-
-
Save tenderlove/6073446 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):004:0> x = RubyVM::InstructionSequence.new('puts "hello #{foo}"') | |
=> <RubyVM::InstructionSequence:<compiled>@<compiled>> | |
irb(main):005:0> puts x.disasm | |
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>========== | |
0000 trace 1 ( 1) | |
0002 putself | |
0003 putobject "hello " | |
0005 putself | |
0006 opt_send_simple <callinfo!mid:foo, argc:0, FCALL|VCALL|ARGS_SKIP> | |
0008 tostring | |
0009 concatstrings 2 | |
0011 opt_send_simple <callinfo!mid:puts, argc:1, FCALL|ARGS_SKIP> | |
0013 leave | |
=> nil | |
irb(main):006:0> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment