From: Martin Sharon Date: 2009-04-27T14:31:24+09:00 Subject: Re: How to parse a "line"? h = {} strs.each{|i|h[(v=i.split).shift]=v} The array size is 1 by this sentense... Todd Benson wrote: > On Sun, Apr 26, 2009 at 11:45 PM, 7stud -- > wrote: >> shift changes the array in place: > I looked at an old thread where Bob Hutchinson piped in about > potential GC problems with this, but that was back in '07 > >> [20, 30] >> x = arr[1..-1] > new object is created by x = > >> [10, 20, 30] >> -- Posted via http://www.ruby-forum.com/.