From: Brian Candler Date: 2003-05-29T19:53:44+09:00 Subject: Re: Array.extend versus instance.extend On Thu, May 29, 2003 at 07:40:14PM +0900, Simon Strandgaard wrote: > Here is my code so far.. you welcome to rip it. > Comments would be nice :-) Looks good to me. You might want to be consistent with either including 'self' as the receiver, or omitting it: i.e. > res << self.shift can be just "res << shift"; or else change "length" to "self.length" etc. If this module only makes sense within an Array, then you could change module ArrayMisc to class Array i.e. just define the methods directly within it. Depends whether you come across anything else which supports 'shift / pop / first / last / length' semantics and therefore might have a use for this as a module. Cheers, Brian.