It's the only way that works so far. I need to explore inside the children and break when I found the correct item or return nil. If it were a local variable, when I break the loop it continues on the next level of the tree (and then it would always return nil). -- Posted via http://www.ruby-forum.com/.