From: Gennady Date: 2003-05-07T01:50:03+09:00 Subject: Re: %w(foo) v.s. ['foo'] I can't imagine either. It must be the same. ahoward, are you testing these 2 constructs in exactly same spot in the code, or they are in different places? Is there a chance that something else breaks in? Are you absolutely sure that the input is exactly the same in both cases? What happens if you mock cgi and provide known values before the statement? Gennady. ----- Original Message ----- From: "Daniel Carrera" To: "ruby-talk ML" Sent: Tuesday, May 06, 2003 9:35 AM Subject: Re: %w(foo) v.s. ['foo'] > On Wed, May 07, 2003 at 01:32:58AM +0900, Gennady wrote: > > %w{year month day} and %w(year month day) are the same thing, you can use > > even %w%year month day% if you want. > > > > Gennady. > > I didn't know that. Ruby rocks. > > But in that case, I can't imagine what the problem with this code could > be. > > > > > any idea why this: > > > > > > > > year, month, day = ['year','month','day'].map{|k| cgi[k]} > > > > > > > > should yeild different results than this: > > > > > > > > year, month, day = %w(year month day).map{|k| cgi[k]} > > -- > Daniel Carrera > Graduate Teaching Assistant. Math Dept. > University of Maryland. (301) 405-5137 > >