Project

General

Profile

Bug #15578 ยป example.rb

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

 
1
method_source = <<-RB
2
def example
3
  1 if 1 == 1
4
rescue
5
end
6
RB
7

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

    
12
TracePoint.trace do |tp|
13
  p [tp.method_id, tp.event]
14
end
15

    
16
example()