T
T. Onoma
matz:
you rejected my rcr on garden saying that retry already does it. but it does not. maybe there's a trick to it? but i could not read your example b/c it was cut off by the < --you have to use < [Aside: why hasn't this been fixed at garden? argghhh..]
so please show me how resume would work with retry here. here is the example again:
def resume_example(x)
begin
print x
x = x + 4
if x < 10
raise
end
print x
rescue
x = 10
resume # if retry -> 51014
end
puts
end
resume_example(5) # -> 510
thanks matz,
-t0
you rejected my rcr on garden saying that retry already does it. but it does not. maybe there's a trick to it? but i could not read your example b/c it was cut off by the < --you have to use < [Aside: why hasn't this been fixed at garden? argghhh..]
so please show me how resume would work with retry here. here is the example again:
def resume_example(x)
begin
print x
x = x + 4
if x < 10
raise
end
print x
rescue
x = 10
resume # if retry -> 51014
end
puts
end
resume_example(5) # -> 510
thanks matz,
-t0