diff --git a/lib/arel/algebra/relations/operations/take.rb b/lib/arel/algebra/relations/operations/take.rb index 7098d578d5def32e2332b52f8236fd6444397573..421051124c90cc0912bd952e93c0a0e1dc4ae5bf 100644 --- a/lib/arel/algebra/relations/operations/take.rb +++ b/lib/arel/algebra/relations/operations/take.rb @@ -7,13 +7,6 @@ def initialize relation, taken @taken = taken end - def == other - super || - Take === other && - relation == other.relation && - taken == other.taken - end - def engine engine = relation.engine diff --git a/spec/algebra/unit/relations/relation_spec.rb b/spec/algebra/unit/relations/relation_spec.rb index ec311d0c43697e26678a5ca7f71f36ef4c76a19e..1a15471f9aa3fcf366569c230583150a082916c5 100644 --- a/spec/algebra/unit/relations/relation_spec.rb +++ b/spec/algebra/unit/relations/relation_spec.rb @@ -134,7 +134,9 @@ module Arel describe '#take' do it "manufactures a take relation" do - @relation.take(5).should == Take.new(@relation, 5) + take = @relation.take(5) + take.relation.should == @relation + take.taken.should == 5 end describe 'when given a blank number of items' do