JRuby

Nested Exceptions do not set $! correctly

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 0.9.2
  • Fix Version/s: JRuby 0.9.8
  • Component/s: Interpreter
  • Labels:
    None
  • Environment:
    Java 6
    JRuby 9.2
  • Testcase included:
    yes
  • Number of attachments :
    1

Description

When exceptions are nested in the rescue node, the internal rescue nodes always set $! to nil, which is not necessarily correct. $! should instead be restored to whatever value it held when it entered the nested rescue. I've attached a patch with a test case and a fix.

Activity

Hide
Thomas E Enebo added a comment -

Patch from 373 applied to fix this also. Thanks Ryan

Show
Thomas E Enebo added a comment - Patch from 373 applied to fix this also. Thanks Ryan

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: