Am Dienstag, 11. Juni 2002 23:24 schrieben Sie:
> On Tuesday 11 June 2002 02:09 pm, Kurt Euler wrote:
> > In line 8 in the code below, I want to reset the string variable
> > "content2" with the value in string variable "intro". However, what
> > I'm finding is that line 8 sets up "content2" as some type of
> > pointer to "intro": The content2.gsub commands I'm making in lines
> > 9 through 12 are affecting the value of "intro" as if I were doing
> > "intro.gsub" commands.
>
> Well, sure. You're just pointing to intro. If you want to edit it,
> just make a copy of it.
>
> > The solution has got to be simple, but it it illudes me. Your help
> > appreciated! Thanks! -k euler
> >
> > 08     content2 = intro
>
> try
> 	content2 = intro.dup
if you want more info as always Dave & Andy have done the work :-)
http://www.rubycentral.com/ref/ref_c_object.html#dup

similary
content2=String.new(intro)




-- 
Armin.

-----------------------------------------------
Armin Roehrl, http://www.approximity.com
Training, Development and Mentoring
OOP, XP, Java, Ruby, Smalltalk, Datamining, Parallel computing, Webservices
Koautor des ersten dt. Rubybuches http://approximity.com/rubybuch/
Naechstes Rubyseminar: 9/9-11/9 in Hamburg. 

Don't work hard, work smart.