From: Sean Chittenden Date: 2001-11-14T05:19:28+09:00 Subject: [ruby-talk:25066] Re: REXML behavior change RFC > The current behavior of Element.elements[] is to return the first > matching element. I propose changing this behavior so that it returns an > array of matching elements. This will allow you to write: Why not overload to_s so that it returns the first element, then overload to_a so that it'll return an array? If you know your data and know you only want one element, having it short-circuit the search is a Good Thing(TM) for performance. ;~) -sc