[ruby-core:82012] Re: [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems

From: Eric Wong <normalperson@...>
Date: 2017-07-12 22:40:35 UTC
List: ruby-core #82012
Eric Wong <normalperson@yhbt.net> wrote:
> nobu@ruby-lang.org wrote:
> > Or should `fstring_cmp` consider also tainted flags?
> 
> I considered doing that, but it may not be optimal since I want
> to share heap allocations with the non-tainted version via
> rb_str_dup.

Slightly better version with commit message + stronger test for
sharing, and also using rb_str_resurrect instead of rb_str_dup:

   https://80x24.org/spew/20170712223226.20939-1-e@80x24.org/raw

I will commit in a few days if no response.


Also, rb_hash_bulk_insert should do the same and avoid blind
calls to rb_str_new_frozen.  This will be a separate, trivial
(I hope) change to try rb_fstring_existing before
rb_str_new_frozen.

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