From: Tanaka Akira Date: 2010-03-22T00:14:44+09:00 Subject: Re: Grouping elements of an array 2010/3/21 Colin Bartlett : > I must admit that when I made my post I was having difficulty > following your code for > Enumerable#slice_between > and the result you show for it of > [["A"], ["B"], ["C", "D", "E"], ["F", "G"]] > isn't (I think) what the original poster wanted. > But I've just changed your condition of > (t2-t1) < 30 > to > ! ( (t2-t1) < 30 ) > and that gives the wanted result of: > [["A", "B", "C"], ["D"], ["E", "F"], ["G"]] > and it was that that made my realise the meaning of "slice_between". Oops. You are right. -- Tanaka Akira