From: Rick DeNatale Date: 2008-05-09T21:48:43+09:00 Subject: Re: Principle of le,err i mean biggest surprise!!?? On Thu, May 8, 2008 at 8:15 PM, globalrev wrote: > puts "Input sentence:" > sentence = gets.split() > puts > > temp = sentence > phrase = sentence > puts ":", temp, sentence, phrase > > phrase[0] = temp[1] > puts "oink", phrase, temp > > when changing phrase[0] this will change temp as well and even > sentence! makes no sense and very surprising. how do i do what i want > to do? > > so basically ami messing with pointers here or what? http://talklikeaduck.denhaven2.com/articles/2006/09/13/on-variables-values-and-objects -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/