Projects

Ticket #707 (closed defect: fixed)

Opened 21 months ago

Last modified 21 months ago

raising an exception inside a rescue raises the rescued exception instead of the new exception

Reported by: thilo@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby 0.7
Component: MacRuby Keywords:
Cc:

Description

Hi while trying to setup a testsuite with mocha and bacon by using Eloy's mocha-on-bacon things fall apart because of the mentioned bug.

Here some code to reproduce the bug:

def test_catch_and_raise

begin

raise StandardError

rescue

raise Exception

end

end

-- macruby 0.6 -- test_catch_and_raise => StandardError: StandardError -- ruby 1.9.1 test_catch_and_raise => Exception: Exception

Change History

Changed 21 months ago by lsansonetti@…

$ ./miniruby -e "begin; raise 'bad'; rescue; raise 'ok'; end"
/Users/lrz/src/macruby-trunk/-e:1:in `<main>': bad (RuntimeError)

I bet it's related to the way we push/pop VM exceptions in the landing pad.

Changed 21 months ago by lsansonetti@…

Added to test_vm in r4080.

Changed 21 months ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.7

Should be fixed in r4090.

Changed 21 months ago by thilo@…

works, thx :)

Note: See TracTickets for help on using tickets.