From: Behrang Saeedzadeh Date: 2005-08-31T21:22:08+09:00 Subject: Re: Ruby documentation typo ------=_Part_2812_27873484.1125490924314 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi David, Thanks for the information. Actually I'm new to Ruby, and I've not passed= =20 that page yet so... Best Regards, Behrang S. On 8/31/05, David A. Black wrote:=20 >=20 > Hi -- >=20 > On Wed, 31 Aug 2005, Behrang Saeedzadeh wrote: >=20 > > Hi all > > > > I just stumbled upon a typo in the Ruby documentation and thought it > > would be OK to mention it here. > > > > The typo is at the http://www.rubycentral.com/book/intro.html page: > > > > --- > > Sometimes creating arrays of words can be a pain, what with all the > > quotes and commas. Fortunately, there's a shortcut: %w does just what > > we want. > > > > a =3D %w{ ant bee cat dog elk } > > --- > > > > I guess, the %w{ ant bee cat dog talk } must be %w[ ant bee cat dog > > talk] as we're talking about arrays and not hashes. >=20 > Actually %w can take just about any delimiter: >=20 > %w-a b c- > %w!a b c! >=20 > etc. So you can definitely use {}. >=20 >=20 > David >=20 > -- > David A. Black > dblack@wobblini.net >=20 >=20 --=20 Behrang Saeedzadeh http://www.jroller.com/page/behrangsa ------=_Part_2812_27873484.1125490924314--