From: Todd Benson Date: 2008-04-10T20:51:48+09:00 Subject: Re: global array of hashes On Thu, Apr 10, 2008 at 6:45 AM, Mario Ruiz wrote: > I'm doing this: > > $globvar=Array.new() > $globvar[0]="mygenericvalue" > localvar=$globvar > localvar[0]="mylocalvalue" > puts $globvar > > And the result for $globvar is "mylocalvalue" > > How can I assign to localvar only the value of $globvar and not the > memory possition?? > > Thanks This seems to work... localvar = $globvar.dup Todd