--- "Mark J. Reed" <markjreed / mail.com> wrote: > MJR = me
> JC = Jason Creighton
> 
> 
> MJR> 	module ObjectSpace
> MJR> 	    class << self
> MJR> 	        include Enumerable
> MJR> 		def each(*args, &block) each_object(*args, &block) end
> MJR> 	    end
> MJR> 	end
> 
> JC> err....why don't you just alias each to each_object?
> 
> JC> module ObjectSpace
> JC>   class << self
> JC>     include Enumerable
> JC>     alias :each :each_object
> JC>   end
> JC> end
> 
> Uhm . . . because it's too easy?  

I agree with Jason here, alias is the way to go, it even speeds it up on
my machine, odd as it seems.

> I wanted to show off my understanding of passing &blocks around?  
> Maybe I'm a firm believer in TMTOWTDI?  

TMTOWTDI is a perl idiom :) 

> Would you believe . . . I just forgot about alias? :)

It happens :) I have aliases too: people call me "percy" from time to
time, depending on who's asking :)

-- Thomas Adam

=====
Thomas Adam

"The Linux Weekend Mechanic" -- www.linuxgazette.com

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk