From: Dave Thomas Date: 2002-10-13T08:22:36+09:00 Subject: Re: Delegating each Michael Schuerig writes: > class C > include Enumerable > ... > def each(&proc) > @myarray.each do |e| > proc.call(e) > end > end > end > > Is there a more direct way of implementing each? Is is possible to get > rid of the each-loop and delegate its behavior to myarray? def each(&block) @myarray.each(&block) end Cheers Dave