Issue #13669 has been updated by nagachika (Tomoyuki Chikanaga).

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.

----------------------------------------
Bug #13669: Enumerable#uniq is ignoring second and following block arguments
https://bugs.ruby-lang.org/issues/13669#change-66034

* Author: kachick (Kenichi Kamiya)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0dev (2017-06-20 trunk 59122) [x86_64-darwin16]
* Backport: 2.2: DONTNEED, 2.3: DONTNEED, 2.4: DONE
----------------------------------------
github: https://github.com/ruby/ruby/pull/1658

```ruby
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
---

```ruby
[nil, 0, 1, [0, :LABEL]]
```

Is this intentional?

Expected
---

```ruby
[nil, 0, 1, [0, :LABEL], [1, :LABEL], [1, :DIFFERENT]]
```



-- 
https://bugs.ruby-lang.org/

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