Skip to content

Instantly share code, notes, and snippets.

@cout
Created May 11, 2012 14:04
Show Gist options
  • Save cout/2659871 to your computer and use it in GitHub Desktop.
Save cout/2659871 to your computer and use it in GitHub Desktop.
pry-disasm example
[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