From: "Paulo Sérgio" Date: 2005-04-24T07:28:48+09:00 Subject: Re: What im doing WRONG?!?!?! Florian Frank wrote: >Paulo Sérgio wrote: > > > >>def successors(state) #state is an integer array equal to, for >>example, [0,0,0,0] >> successorsStates = [] >> for i in 0...state.length >> break if state[i] != 0 >> for j in 1..4 >> stateAux = state >> >> > >stateAux = state.dup > > Yeah, thanks, it really worked. The dup method creates a new copy of the object, correct? But i can't figure out why without dup it not worked since state variable never change. -- Paulo S Medeiros - B.Sc Student - DCC/COPPE/UFRJ - Brazil