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: opal/opal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 478b9c605628
Choose a base ref
...
head repository: opal/opal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 969361c1a8c5
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Jul 12, 2015

  1. Copy the full SHA
    6f359e3 View commit details
  2. Merge pull request #1000 from vais/array-intersection

    Array#& determines equivalence between elements in the sense of eql?
    elia committed Jul 12, 2015

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    969361c View commit details
Showing with 2 additions and 3 deletions.
  1. +2 −2 opal/corelib/array.rb
  2. +0 −1 spec/filters/bugs/array.rb
4 changes: 2 additions & 2 deletions opal/corelib/array.rb
Original file line number Diff line number Diff line change
@@ -79,11 +79,11 @@ def &(other)
for (var i = 0, length = self.length; i < length; i++) {
var item = self[i];
if (!seen[item]) {
if (!seen.hasOwnProperty(item)) {
for (var j = 0, length2 = other.length; j < length2; j++) {
var item2 = other[j];
if (!seen[item2] && #{`item` == `item2`}) {
if (!seen.hasOwnProperty(item2) && #{`item`.eql?(`item2`)}) {
seen[item] = true;
result.push(item);
}
1 change: 0 additions & 1 deletion spec/filters/bugs/array.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
opal_filter "Array" do
fails "Array#& determines equivalence between elements in the sense of eql?"
fails "Array#* with a string returns a string formed by concatenating each element.to_str separated by separator"
fails "Array#* with a string uses the same separator with nested arrays"
fails "Array#- doesn't remove an item with the same hash but not #eql?"