From: Catsquotl Date: 2012-02-23T17:58:41+09:00 Subject: Re: cheered to soon enumerable woos Hi, I can't seem to get my head around what is happening in the code-snippet below. What i think is happening is this. each is called with a block. this block iterates over each element of the flattened array. But then? what does the last call to each(&block) on line 2 do? when called with a block say self.each{|n| puts n} nothing seems to happen and the flattened array is returned. Can anyone say what's going on? I've read up on blocks, procs and lambda's for the last few hours, but I can't seem to get to grips with the logic. call me stupid Eelco > def each(&block) > [@afk, @name, @chname, @locatie, @aard, @actie].flatten.each(&block) > end > >