F
fluffyx
Hi. I have a recursive function (it calls itself) that accepts a block.
def arecursor(param)
[...]
yield var
[...]
if (some condition)
arecursor(another_var)
end
[...]
end
When the function is first called, the yield statement succeeds. But
after the function calls itself, it looses the block. How do I make the
block persistant-- can I do something like this::?
arecursor(another_var) { use my block }
Thanks,
Oliver
def arecursor(param)
[...]
yield var
[...]
if (some condition)
arecursor(another_var)
end
[...]
end
When the function is first called, the yield statement succeeds. But
after the function calls itself, it looses the block. How do I make the
block persistant-- can I do something like this::?
arecursor(another_var) { use my block }
Thanks,
Oliver