Michael Malone wrote: > However, I don't reccomend testing on the item.class. I can't explain > why very well, but it seems wrong to me. Maybe someone else can...? I think it's fine. You need some way to distinguish between a leaf node and an inner node, and how you do that depends on how your data structure is built. Here, the assumption is that inner nodes are Arrays and leaf nodes are anything else. -- Posted via http://www.ruby-forum.com/.