[ruby-core:89562] Re: [Ruby trunk Feature#15251] Hash aset should deduplicate non tainted string

From: Eric Wong <normalperson@...>
Date: 2018-10-26 05:38:55 UTC
List: ruby-core #89562
[email protected] wrote:
> I think so far it looks good, let me know if I did something wrong while running the above benchmark.

I agree, so I've committed your patch as-is for r65371.

I wanted to try a shorter patch:

https://80x24.org/spew/[email protected]/raw

But I got some spec failures due to singleton class (below).  I
haven't investigated, yet, but I think there may be an existing
bug in hash.c, because my shorter patch ought to work...

1)
Hash#[]= duplicates string keys using dup semantics FAILED
Expected "bar"
 to equal "oof"

ruby/spec/ruby/core/hash/shared/store.rb:16:in `block (2 levels) in <top (required)>'
ruby/spec/ruby/core/hash/element_set_spec.rb:5:in `<top (required)>'

2)
Hash#store duplicates string keys using dup semantics FAILED
Expected "bar"
 to equal "oof"

ruby/spec/ruby/core/hash/shared/store.rb:16:in `block (2 levels) in <top (required)>'
ruby/spec/ruby/core/hash/store_spec.rb:5:in `<top (required)>'

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

In This Thread