Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f48399a73f53
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 82ab6e3181af
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Apr 5, 2018

  1. Fix Enumerable#uniq for entry pair

    The second part of the pair was ignored before which resulted e.g.
    
    class Foo
      include Enumerable
      def each
        yield 1
        yield 1,2
      end
    end.new.to_enum.uniq -> [1] instead of [1, [1,2]]
    
    Fixes test/mri/ruby/test_enum.rb#test_uniq test.
    ChrisBr committed Apr 5, 2018
    Copy the full SHA
    daa9010 View commit details

Commits on Apr 12, 2018

  1. Merge pull request #5129 from ChrisBr/test/fix-enum-uniq

    Fix Enumerable#uniq for entry pair
    headius authored Apr 12, 2018
    Copy the full SHA
    82ab6e3 View commit details
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/src/main/ruby/jruby/kernel/enumerable.rb
2 changes: 1 addition & 1 deletion core/src/main/ruby/jruby/kernel/enumerable.rb
Original file line number Diff line number Diff line change
@@ -123,7 +123,7 @@ def uniq
values << obj
end
else
each do |obj|
each_entry do |obj|
next if hash.key? obj
hash[obj] = obj unless hash.key? obj
values << obj