From: Austin Ziegler Date: 2004-08-06T21:48:00+09:00 Subject: Re: %w for symbols On Fri, 6 Aug 2004 20:21:25 +0900, Florian Gross wrote: > Austin Ziegler wrote: > > It seems common enough that it might be nice to have this. Perhaps > > %W{} instead of %w{} ? > %W{} is already taken: > > irb(main):006:0> %W{1 #{1+1} 3} > => ["1", "2", "3"] > irb(main):007:0> %w{1 #{1+1} 3} > => ["1", "#{1+1}", "3"] > > And I think that [:foo, :bar, :qux] is already short enough. Ah, but (to use Gavin's suggested form): %s(1 2 3) is shorter than [:"1", :"2", :"3"] for any given version. I don't know how often I'd use this -- I rarely even use %w{} (and didn't even know about %W{}), except in unit tests. It seems like a good idea, though. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca