Skip to content

Commit

Permalink
Fix missing parameter in Set#isProperSuperset [Josh W].
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoglan committed Jun 22, 2009
1 parent 547b845 commit 9a9c128
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ JS.Set = new JS.Class('Set', {
return this._members.length < other._members.length && this.isSubset(other);
},

isProperSuperset: function() {
isProperSuperset: function(other) {
return this._members.length > other._members.length && this.isSuperset(other);
},

Expand Down
1 change: 1 addition & 0 deletions test/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,7 @@

// http://en.wikipedia.org/wiki/Subset
assert(new JS.HashSet([1,2]).isProperSubset(new JS.HashSet([1,2,3])));
assert(new JS.HashSet([1,3,2]).isProperSuperset(new JS.HashSet([1,2])));
assert(new JS.HashSet([3,1,2]).isSubset(new JS.HashSet([1,2,3])));
assert(!( new JS.HashSet([3,1,2]).isProperSubset(new JS.HashSet([1,2,3])) ));
assert(new JS.SortedSet().isSubset(new JS.HashSet([1,2,3])));
Expand Down

0 comments on commit 9a9c128

Please sign in to comment.