From: Stephen Celis Date: 2008-06-18T08:55:44+09:00 Subject: Re: quick question about how array objects are handled You want array.delete_if http://www.ruby-doc.org/core/classes/Array.html#M000307 On Jun 17, 2008, at 6:38 PM, Chance Dinkins wrote: > Btw, thanks in advance for any help - this community seems great! > > I'm using the following line to try to remove objects from an array > that > begin with . > _array.each{|item| item.gsub(/^[\.][.]*/){|match| > _array.delete(match)}} > > and although the match is functioning properly, the _array still > contains the values after being deleted. I've wondered if > Array.delete("param") actually returns the resulting array but that > doesnt seem to be the case. How do I go about actually altering the > state of the current array if the above is not done correctly? > > Thanks for your help! > -- > Posted via http://www.ruby-forum.com/. >