From: Sebastian Hungerecker Date: 2008-08-01T22:19:37+09:00 Subject: Re: Using array.select with grep David A. Black wrote: > No, that's not the same. > > >> array = %w{ one two three } > > => ["one", "two", "three"] > > >> array.grep(/e/) > > => ["one", "three"] array.grep("e") => [] So since the code in question only deals with strings and not regexen, using include? does indeed have the same result as checking whether grep returned an empty array. HTH, Sebastian -- Jabber: sepp2k@jabber.org ICQ: 205544826