Project

General

Profile

Actions

Bug #13669

closed

Enumerable#uniq is ignoring second and following block arguments

Bug #13669: Enumerable#uniq is ignoring second and following block arguments

Added by kachick (Kenichi Kamiya) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0dev (2017-06-20 trunk 59122) [x86_64-darwin16]
[ruby-core:<unknown>]

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 Actions #1

  • 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 Actions #2

  • Status changed from Open to Closed

Applied in changeset trunk|r59128.


Fix Enumerable#uniq with non single yield arguments

Author: Kenichi Kamiya

Updated by nagachika (Tomoyuki Chikanaga) over 8 years ago Actions #3 [ruby-core:82254]

  • 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

Also available in: PDF Atom