From: Todd Benson Date: 2008-03-14T14:29:24+09:00 Subject: Re: << : can some body check this code?? On Thu, Mar 13, 2008 at 8:40 PM, Chinna Karuppan wrote: > I think I found an answer not sure if it is normal way to do things.... > weeks << week.clone instead of week... > Looking forward for comments... > THnks > > > > > > weeks << week > > p week,weeks > > week.clear > > > > end > > end > > weeks << week if week.length != 0 > > weeks > > end > > > > p cal_week(4) > > > > I think it is the problem of week still remembering the values.... > > THnks > > CHinna Yes, you are using the same Array object over and over with week.clear. I tend to just do week = [] instead of clone. Todd