[ruby-core:94870] Re: [Ruby master Feature#16150] Add a way to request a frozen string from to_s

From: Eric Wong <normalperson@...>
Date: 2019-09-09 18:05:40 UTC
List: ruby-core #94870
headius@headius.com wrote:
> https://bugs.ruby-lang.org/issues/16150

Last year, I planned on making peephole optimizations so
"#{foo}"+frozen-string-literal and `foo.to_s.freeze' could
return frozen/reused strings.  But I ran out-of-time.

The objective is/was always to provide forward/backwards
compatibility without breaking old code and also enabling
developers to target newer Rubies while keeping code working
on older Rubies.

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

In This Thread

Prev Next