From: Peter Wu Date: 2009-03-15T01:55:02+09:00 Subject: Re: How do arrays in Ruby work? Rick Denatale wrote: > So far we haven't done anything which would add or remove anything > > arr.slice(1) simply returns a reference to the object in the second > element > of arr. arr is untouched > > arr.slice(1,3) would return an array containing the second, third and > fourth > elements, the original array would be untouched. That's my mistake, arr.slice!(1) was the intention. But I see what you're saying. -- Posted via http://www.ruby-forum.com/.