From: Sam Haskins Date: 2008-07-29T08:33:25+09:00 Subject: Re: what is %w What sort of situations is that syntax useful in? On Jul 28, 2008, at 2:39 PM, David A. Black wrote: > Hi -- > > On Tue, 29 Jul 2008, Joel Saltzmanjoelh wrote: > >> What is the %w used for in ruby? > > To create an array of strings: > > %w{ one two three } # same as ["one", "two", "three"] > > You can use other delimiters, like []. I'm not sure why I've > gravitated toward curly braces for this. > > > David > > -- > Rails training from David A. Black and Ruby Power and Light: > * Advancing With Rails August 18-21 Edison, NJ > * Co-taught by D.A. Black and Erik Kastner > See http://www.rubypal.com for details and updates! >