From: Austin Ziegler Date: 2003-12-14T08:38:44+09:00 Subject: Re: additional methods for Array On Sun, 14 Dec 2003 01:10:55 +0900, David Garamond wrote: > I'm wondering what other people's thoughts are about adding these > methods. They are found in PHP but not in Ruby at the moment. I'm not > submitting an RCR because I don't feel strongly about these myself, but > since Ruby's class library are usually "battery-included", there might be > interest to include the methods below as well. Each of these can be > implemented with a few lines of Ruby. > > Array#shuffle -> nil > Array#pick(n=1) -> anArray (method name?) > Array#pick(n=1) { |x,y,z...| } (syntax? method name?) feed block with > Array#chunk(n) -> anArray I would suggest that you may want to implement these in pure Ruby and add them to Gavin Sinclair's Standard Library Extensions library available on RubyForge. If they become popular enough, then people can note that in feedback and that would weigh heavily on their utility and need. -austin -- austin ziegler * austin@halostatue.ca * Toronto, ON, Canada software designer * pragmatic programmer * 2003.12.13 * 18.37.13