From: Edgardo Hames Date: 2004-08-07T05:45:54+09:00 Subject: Re: Defining a new function by composition On Sat, 7 Aug 2004 04:46:25 +0900, Robert Klemme wrote: > > "Edgardo Hames" schrieb im Newsbeitrag > news:478c16ae0408061209424c2032@mail.gmail.com... > > > > I would like to add a method to the Array class, say Array#pop! which > > is actually split!(-1). But then, I can think of a more general > > problem: define a new function by composition of two or more > > functions. > > How about > > class Array > def pop!() split!(-1) end > end I imagined this. But, I thought you were going to surprise me with a weird (or unimagined) way to use alias ;-) Thanks, Ed