Snoopy Dog wrote:
> Sam Gentle wrote:
>    snip
>> I'd do something like this:
... snip snip
> 
> I will go do some more reading to see if I can figure them out.
> 
> Thanks
> Snoopy

OK, I think I have figured out most of it...  Amazing how the 
documentation can help out when you see the code in action.

mergedata = [data[0]] - creates a new array with just one element in it!

the mergedata.push - pushes elements on to the array (appends).

and the data.each_cons(2) - I ASSUME that this takes two elements at a 
time from the data array.

How it stays in sync I don't know.

This looks like it will do everything that I need.  I will do a bit more 
testing and then throw it on to the live data.

THANKS
Snoopy

-- 
Posted via http://www.ruby-forum.com/.