From: "David A. Black" Date: 2005-12-01T23:23:09+09:00 Subject: Re: [BUG] string range membership Hi -- On Thu, 1 Dec 2005, Bob Showalter wrote: > David A. Black wrote: >>> No, that's fine. More efficient would be >>> >>> !('1'..'10').find({|x| x == '2'}).nil? >> >> >> I don't think find takes a hash argument :-) Also, why not lose the ! >> and the .nil? ? > > a) The fingers get ahead of the brain :) > b) To get a true/false. But not needed, of course. You can do: enum.any? {|e| ... } to get a true/false result. David -- David A. Black dblack@wobblini.net