I create a small method

 def counting(p1,p2)
	p1 = p1 + 1
	p2 = p2 + 2
	return p1,p2
 end

 sum-by-1s=0
 sum-by-2s=0
 while line = gets
	# need driver test the method
	line=line.chop
	sum-by-1s, sum-by-2s = counting(sum-by-1s,sum-by-2s)
end	

The method works. I am using PickAxe as my reference.
I don't recall see any thing stating you could assign values in an array
 to variables by separating the variables by  commas on the leftside of
the 
 assignment statement. I just want to know which book or reference
should I use to
 understand why assignments can be made in this way?
Or am I just seeing a side effect of my poor coding skills?

Thank you,
Raymond