From: Eric Wong Date: 2018-10-24T21:47:03+00:00 Subject: [ruby-core:89553] Re: [Ruby trunk Feature#15251] Hash aset should deduplicate non tainted string chopraanmol1@gmail.com wrote: > https://bugs.ruby-lang.org/issues/15251 > I'm not sure if current behavior is expected one or a bug. So fell free to > change tracker type. current behavior is intentional because of a regression case: https://bugs.ruby-lang.org/issues/9188 > Currently Hash aset checks if non-tainted string exists in > fstring table or not, if it does not then ruby duplicates > string and freeze it. This works well for string_literal > because they are already registered in fstring table during > compilation, but it doesn't work for non-string literal. Right, I prefer we always dedupe since more programs will benefit. We can take a small regression for programs that write uncommon/random keys to hashes. Unsubscribe: