Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Created April 19, 2016 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tenderlove/b592197ad6fab797690ceb2073744f19 to your computer and use it in GitHub Desktop.
Save tenderlove/b592197ad6fab797690ceb2073744f19 to your computer and use it in GitHub Desktop.
ruby_code = <<-eorby
def foo bar, baz
p bar
p baz
end
foo
eorby
puts RubyVM::InstructionSequence.new(ruby_code).disasm
puts RubyVM::InstructionSequence.new(ruby_code, nil, nil, 0, :operands_unification => false).disasm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment