From: Catsquotl Date: 2012-02-24T21:41:46+09:00 Subject: Re: cheered to soon enumerable woos Thank you, After reading your post i took another look at what i was trying to do. As i am just playing with different ide's, different irb setups and Rspec testing. I missed what exactly was happening. I had hoped to be able to use include? to return true even on a substring. It does not do so in Arrays. Also i wanted my search method to return either true or false, but with the each(&block) coded as it is the search method will return the entire array defined in each rendering my result.should == true or false useless... Anyway I settled on the following. def each(&block) [@afk, @name, @chname, @locatie, @aard, @actie].flatten.each(&block) end def search str self.each do|n| if n.match(str) then return true end end end I do have the notion that search could be changed to return true or false, but this way i can test whether it is true or not_true. And the class does what it needs to do... Eelco > Btw. that method should conventionally return "self" at the end. > > Kind regards > > robert > >