Project

General

Profile

Bug #15578 ยป example.rb

zetter (Chris Zetter), 01/31/2019 04:16 PM

 
method_source = <<-RB
def example
1 if 1 == 1
rescue
end
RB

iseq = RubyVM::InstructionSequence.compile(method_source, peephole_optimization: true)
# puts iseq.disasm
iseq.eval

TracePoint.trace do |tp|
p [tp.method_id, tp.event]
end

example()
    (1-1/1)