How to reset a variable to the value in another variable?


(Kurt Euler) #1

Thanks all. Works great!

-ke

···

-----Original Message-----
From: james@rubyxml.com [mailto:james@rubyxml.com]
Sent: Tuesday, June 11, 2002 3:55 PM
To: ruby-talk@ruby-lang.org
Subject: RE: How to reset a variable to the value in another variable?

similary
content2=String.new(intro)

And if you don’t want a new String object, just the same object with new
contents, you could do

content2.replace( intro )

James