From: Farrel Lifson Date: 2006-08-11T21:56:54+09:00 Subject: Re: Need to understand code On 11/08/06, junkone1@gmail.com wrote: > This is an extract from > http://www.codeforpeople.com/lib/ruby/arrayfields/arrayfields-3.5.0/README > that i am trying to understand. > > > > relation = pgconn.query sql > relation.size #=> 65536 > > # yikes! do we really want to re-construct a hash for for each > tuple when > # we already have Arrays? > > fields = %w(ssn name position) > table.each{|tuple| tuple.fields = fields} > > tuples[34578]['ssn'] #=> 574865032 > > What does this term mean %w....... > > > %w(ssn name position) is the same as ["ssn", "name", position"] Farrel