berkesokhan / rubydotnetcompiler

Automatically exported from code.google.com/p/rubydotnetcompiler
1 stars 0 forks source link

Not all rescue clauses are evaluated #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
## 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

GoogleCodeExporter commented 9 years ago

Original comment by meaningi...@gmail.com on 25 Oct 2007 at 5:17