From: Jeff Wood Date: 2005-10-20T00:54:26+09:00 Subject: Re: Unit Testing with REXML questions true. On 10/19/05, Gavin Kistner wrote: > On Oct 16, 2005, at 9:07 AM, Jeff Wood wrote: > > count = 0 ; xml.elements( '/a/d' ).each { count += 1 ) ; puts count > > Because the each method returns the collection, you can actually just > do this (odd-looking) hack: > puts xml.elements.each('/a/d'){}.size > > (The block is required, but may be empty.) > > -- "http://ruby-lang.org -- do you ruby?" Jeff Wood