From: Robert Dober Date: 2006-06-18T08:58:52+09:00 Subject: Re: Newbie question about arrays. ------=_Part_27653_204239.1150588729544 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 6/18/06, Robin Stocker wrote: > > Gautam Dey wrote: > > So I was going through the Ruby array documentation and came across > > Array. abbrev(pattern =3D nil). However, every time I run the example c= ode > > in irb I get the following: > > > > rb(main):001:0> %w{ car cone }.abbrev > > NoMethodError: undefined method `abbrev' for ["car", "cone"]:Array > > from (irb):1 > > irb(main):002:0> > > > > > > What am I doing wrong? Do I need to include a module? If so, how? > > Yes, you need to do require 'abbrev'. > > It should be mentioned in the documentation, but it is not. I think > Gavin Sinclair is the one to contact in this case, so this mail is CC to > him. > > Gavin, could you add a note to lib/abbrev.rb, something like: > You need to require the abbrev module in order to use this functionality. Would be nice to remove the abbrev entry in the core doc of Array, or alternatively, indicate that this is an extension of Array implemented in the abbrev file. The doc is quite good, really, ty all for your work! Robert Thanks, > Robin > > --=20 Deux choses sont infinies : l'univers et la b=EAtise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------=_Part_27653_204239.1150588729544--