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: 87a7a4440249
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f7b72f0dff59
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Feb 8, 2015

  1. [Trufflle] Use complete Rubinius version of Array#&.

    We didn't used to support Rubinius::IdentityMap, so we needed to work around that.  Now that we support it, we can use the same exact code as Rubinius.
    nirvdrum committed Feb 8, 2015
    Copy the full SHA
    3ba68f3 View commit details
  2. Copy the full SHA
    f7b72f0 View commit details
Showing with 2 additions and 4 deletions.
  1. +0 −2 spec/truffle/tags/core/array/intersection_tags.txt
  2. +2 −2 truffle/src/main/ruby/jruby/truffle/core/rubinius/kernel/common/array.rb
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/array/intersection_tags.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
fails:Array#& creates an array with no duplicates
fails:Array#& creates an array with elements in order they are first encountered
fails:Array#& properly handles recursive arrays
fails:Array#& determines equivalence between elements in the sense of eql?
Original file line number Diff line number Diff line change
@@ -38,13 +38,13 @@ def self.[](*args)
ary
end

# Modified implementation until we support Rubinius::IdentityMap.
def &(other)
other = Rubinius::Type.coerce_to other, Array, :to_ary

array = []
im = Rubinius::IdentityMap.from other

each { |x| array << x if other.include? x }
each { |x| array << x if im.delete x }

array
end