Slide 45
Slide 45 text
/tmp/hello.rb
puts "Hello, world!"
# This is a comment
RubyVM::InstructionSequence.compile_file("/tmp/hello.rb")
#=> @/tmp/hello.rb>
RubyVM::InstructionSequence.compile_file("/tmp/hello.rb").to_a
#=> ["YARVInstructionSequence/SimpleDataFormat", 2, 0, 1, {:arg_size=>0,
:local_size=>1, :stack_max=>2}, "", "/tmp/hello.rb", "/private/tmp/hello.rb",
1, :top, [], 0, [], [1, [:trace, 1], [:putself], [:putstring, "Hello, world!"],
[:opt_send_simple, {:mid=>:puts, :flag=>264, :orig_argc=>1, :blockptr=>nil}],
[:leave]]]
RubyVM::InstructionSequence