## Adapted from IronRuby tests (
def divide_by_zero
1/0
end
def foo
begin
divide_by_zero
rescue (puts "1"; NameError), (puts "2"; ZeroDivisionError), (puts "3";
TypeError)
puts "rescue"
end
end
foo
Expected output:
1
2
3
rescue
Actual output
1
2
rescue
Each of the clauses after "rescue" should be evaluated before the body of
the rescue clause is evaluated, even when a clause matches the raised
exception.
Original issue reported on code.google.com by meaningi...@gmail.com on 4 Oct 2007 at 3:39
Original issue reported on code.google.com by
meaningi...@gmail.com
on 4 Oct 2007 at 3:39