eregontp / gmail.com wrote:
> Eric Wong wrote:
> >  Anyways, committed as r57698
> 
> This should have a NEWS entry and tests since it changes the semantics.

Sorry, I forgot; will do.  Thanks for the reminder.

> BTW, should my_string.freeze behave similarly to String#@-?
> Otherwise String#freeze only dedup if the String is a literal.
> Always deduping for String#freeze would make the semantics more consistent.

No.  There is existing code which assumes #freeze always returns
the same object as its caller.  Changing #freeze will break
existing code.

We can only cheat with String literals (opt_str_freeze) because
literals are not assigned to user-visible variables, yet.

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>