Actions
Bug #9202
closedArray#uniq freezes duplicate strings
Description
I imagine this is related to the recent frozen string changes. This behavior change in Array#uniq breaks RubyGems:
$ cat test.rb
p unique: %w[a].uniq.any? { |item| item.frozen? }
p duplicate: %w[a a].uniq.any? { |item| item.frozen? }
$ ruby -v test.rb
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0]
{:unique=>false}
{:duplicate=>false}
$ make runruby
./miniruby -I../trunk/lib -I. -I.ext/common ../trunk/tool/runruby.rb --extout=.ext -- --disable-gems ../trunk/test.rb
{:unique=>false}
{:duplicate=>true}
Files
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0