Actions
Bug #13669
closedEnumerable#uniq is ignoring second and following block arguments
Bug #13669: Enumerable#uniq is ignoring second and following block arguments
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0dev (2017-06-20 trunk 59122) [x86_64-darwin16]
Description
github: https://github.com/ruby/ruby/pull/1658
enum = Object.new.to_enum class << enum def each yield yield nil yield 0 yield 1 yield 0, :LABEL yield [0, :LABEL] yield 1, :LABEL yield 1, :LABEL yield 1, :DIFFERENT end end p enum.uniq Current¶
[nil, 0, 1, [0, :LABEL]] Is this intentional?
Expected¶
[nil, 0, 1, [0, :LABEL], [1, :LABEL], [1, :DIFFERENT]]
Updated by nobu (Nobuyoshi Nakada) over 8 years ago
- Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN to 2.2: DONTNEED, 2.3: DONTNEED, 2.4: REQUIRED
Updated by nobu (Nobuyoshi Nakada) over 8 years ago
- Status changed from Open to Closed
Applied in changeset trunk|r59128.
Fix Enumerable#uniq with non single yield arguments
- enum.c (uniq_func, uniq_iter): need packed value as the unique
key. [ruby-core:81734] [Bug #13669] [Fix GH-1658]
Author: Kenichi Kamiya kachick1@gmail.com
Updated by nagachika (Tomoyuki Chikanaga) over 8 years ago
- Backport changed from 2.2: DONTNEED, 2.3: DONTNEED, 2.4: REQUIRED to 2.2: DONTNEED, 2.3: DONTNEED, 2.4: DONE
ruby_2_4 r59515 merged revision(s) 59128.
Actions