Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix it so it handles an empty body in a rescue clause. Also optimizes…
… the whole thing away.
  • Loading branch information
Graham committed May 5, 2007
1 parent 0323b81 commit 3783095
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/bytecode/compiler.rb
Expand Up @@ -1002,6 +1002,12 @@ def process_rescue(x)
set_label @retry_label
body = x.shift
res = x.shift

if body && body.first == :resbody
# there is no body, so no part of this will ever execute it. Just skip it.
add "push nil"
return
end

add "#exc_start #{ex}"
process body
Expand Down

0 comments on commit 3783095

Please sign in to comment.