From: Paul Date: 2003-07-17T09:49:30+09:00 Subject: callbacks in ruby and using yield in resursion Hi, How do I pass a ruby function as an argument to another ruby function so that it can be used as a callback? Also, I have a recursive tree traversing function that I would like to use yield with. For example: def run(parent,level) .... yield parent .... run(child,level+1)#yield???????? .... end run(root,0){|node| puts node.get_name } It will not work because i cant use the yield in the recursive call to run. Any ideas? Thanks Paul