Skip to content

Instantly share code, notes, and snippets.

@usergenic
Created February 16, 2010 17:40
Show Gist options
  • Save usergenic/305723 to your computer and use it in GitHub Desktop.
Save usergenic/305723 to your computer and use it in GitHub Desktop.
★ rvm use 1.9.1
Now using ruby 1.9.1 p376
★ irb
irb(main):001:0> def a(x,y) x.send(y) end; puts RubyVM::InstructionSequence.disasm(method(:a))
== disasm: <RubyVM::InstructionSequence:a@(irb)>========================
local table (size: 3, argc: 2 [opts: 0, rest: -1, post: 0, block: -1] s1)
[ 3] x<Arg> [ 2] y<Arg>
0000 trace 8 ( 1)
0002 trace 1
0004 getlocal x
0006 getlocal y
0008 send :send, 1, nil, 256, <ic>
0014 trace 16
0016 leave
=> nil
irb(main):002:0> quit
★ rvm use 1.9.2
Now using ruby 1.9.2 preview1
★ irb
irb(main):001:0> def a(x,y) x.send(y) end; puts RubyVM::InstructionSequence.disasm(method(:a))
== disasm: <RubyVM::InstructionSequence:a@(irb)>========================
local table (size: 3, argc: 2 [opts: 0, rest: -1, post: 0, block: -1] s1)
[ 3] x<Arg> [ 2] y<Arg>
0000 trace 8 ( 1)
0002 trace 1
0004 getlocal x
0006 getlocal y
0008 send :send, 1, nil, 0, <ic>
0014 trace 16
0016 leave
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment