From: Paul Brannan Date: 2008-10-22T23:48:28+09:00 Subject: [ruby-core:19446] confused by this catch table irb(main):001:0> require 'internal/proc' => true irb(main):002:0> p = proc { irb(main):003:1* begin irb(main):004:2* 1+1 irb(main):005:2> rescue irb(main):006:2> 2+2 irb(main):007:2> end irb(main):008:1> } => # irb(main):009:0> puts p.body.disasm == disasm: == catch table | catch type: rescue st: 0002 ed: 0009 sp: 0000 cont: 0010 == disasm: local table (size: 2, argc: 0 [opts: 0, rest: -1, post: 0, block: -1] s0) [ 2] #$! 0000 putobject StandardError ( 6) 0002 getdynamic #$!, 0 0005 send :===, 1, nil, 0, 0011 branchunless 21 0013 trace 1 0015 putobject 2 0017 putobject 2 0019 opt_plus 0020 leave 0021 getdynamic #$!, 0 0024 throw 0 | catch type: retry st: 0009 ed: 0010 sp: 0000 cont: 0002 | catch type: redo st: 0000 ed: 0010 sp: 0000 cont: 0000 | catch type: next st: 0000 ed: 0010 sp: 0000 cont: 0010 |------------------------------------------------------------------------ 0000 trace 1 ( 3) 0002 trace 1 ( 4) 0004 putobject 1 0006 putobject 1 0008 opt_plus 0009 nop ( 3) 0010 leave ( 4) => nil Given a start of 9 and an end of 10, the retry catch table entry seems to cover only the instruction at address 9 (the nop). So if a retry is issued, how is it to have any effect? (that is, since there is no code within the retry catch entry's applicable instructions that can throw a retry tag, does this effectively become a no-op?) Paul