Created
May 11, 2012 14:04
-
-
Save cout/2659871 to your computer and use it in GitHub Desktop.
pry-disasm example
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
[3] pry(main)> require 'pry-disasm' | |
=> true | |
[4] pry(main)> class Foo; def foo; 1+1; end; end | |
=> nil | |
[5] pry(main)> disassemble Foo#foo | |
== disasm: <RubyVM::InstructionSequence:foo@(pry)>====================== | |
0000 trace 8 ( 4) | |
0002 trace 1 | |
0004 putobject 1 | |
0006 putobject 1 | |
0008 opt_plus <ic:1> | |
0010 trace 16 | |
0012 leave |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment