Raise in else block should not get re-caught by prior rescue
------------------------------------------------------------
Key: JRUBY-4885
URL: http://jira.codehaus.org/browse/JRUBY-4885
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.5.1
Reporter: Nick Sieger
Assignee: Nick Sieger
Fix For: JRuby 1.6
The following simple test case fails on JRuby but succeeds on 1.8 and 1.9.
{noformat}
require 'test/unit'
class Foo
def test
true
rescue Exception => e
raise "shouldn't get here"
else
raise "should raise out of the method"
end
end
class FooTest < Test::Unit::TestCase
def test_else_block_should_raise_out_of_the_method
begin
Foo.new.test
rescue => e
assert_equal "should raise out of the method", e.message
end
end
end
{noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email