2012-05-24 02:09:23 -04:00
|
|
|
def rec n
|
|
|
|
if n > 0
|
|
|
|
rec n-1
|
|
|
|
else
|
|
|
|
raise
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-05-27 10:41:01 -04:00
|
|
|
i = 0
|
2012-05-24 02:09:23 -04:00
|
|
|
while i<6_000_000 # benchmark loop 2
|
2012-10-15 08:53:12 -04:00
|
|
|
i += 1
|
2012-05-24 02:09:23 -04:00
|
|
|
|
|
|
|
begin
|
|
|
|
rec 1
|
|
|
|
rescue
|
|
|
|
# ignore
|
|
|
|
end
|
|
|
|
end
|