Stefan Lang wrote:
> 2009/1/21 RK Sentinel <sentinel.2001 / gmx.com>:
> > I define a string in one class. Some other class references it, and
> > modifies it. I (somehow) expected that when another referer modifies the
> > reference, ruby would automatically dup() the string.
> 
> This is a well known "problem" with all languages that
> have mutable strings. The solution is simple:

If I understand the OP correctly, his problem has nothing to do with 
strings.

He says he modifies some object ...and to his great surprise the object 
indeed gets modified.
-- 
Posted via http://www.ruby-forum.com/.