>>>>> "C" == Conrad Schneiker <schneiker / jump.net> writes:

C> On page 10 of PR [Programming Ruby] the %w shortcut is shown creating an
C> array with curly braces (a=%w{a d c f}) which works. The same construction
C> also works with square brackets [which] seems more consistant with arrays.
C> This is a bit confusing since it isn't mentioned in the text.

 %w (and other %[Qqwxr]) work with {}, [], <>, () and any characters for
 example  

pigeon% ruby -e 'p %wza b cz'
["a", "b", "c"]
pigeon%

 With {}, [], <>, () you can nest the separators for example

pigeon% ruby -e 'p %w{a {} c }'
["a", "{}", "c"]
pigeon% 


Guy Decoux