M
Martin Sharon
h = {}
strs.each{|i|h[(v=i.split).shift]=v}
The array size is 1 by this sentense...
strs.each{|i|h[(v=i.split).shift]=v}
The array size is 1 by this sentense...
Todd said:I looked at an old thread where Bob Hutchinson piped in aboutshift changes the array in place:
potential GC problems with this, but that was back in '07
new object is created by x =[20, 30]
x = arr[1..-1]
[10, 20, 30]