Top Level Namespace

Defined Under Namespace

Modules: Enumerable, RpRb

Instance Method Summary collapse

Instance Method Details

#trythese(*procs) ⇒ Object

class Rational

def inspect
    to_s
end

end



19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/rprb.rb', line 19

def trythese(*procs)
    if procs.length == 0
        raise "Ahhg!"
    else
        begin
            procs[0].call
        rescue Exception => error
            #puts "ERROR: " + error
            trythese(*procs[1..-1])
        end
    end
end