aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-28 15:27:18 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-28 15:27:18 -0700
commit60b8a98c15186429a9bf216dbbae0f3b71b666bd (patch)
treec02cf020ab070bdb59b877bc9dd532ee3efd2fe2
parentea1d050266e76d0200f8ff749e537fc66c17ff4f (diff)
downloadrails-60b8a98c15186429a9bf216dbbae0f3b71b666bd.tar.gz
rails-60b8a98c15186429a9bf216dbbae0f3b71b666bd.tar.bz2
rails-60b8a98c15186429a9bf216dbbae0f3b71b666bd.zip
implementing hash is a non-requirement
-rw-r--r--lib/arel/engines/sql/relations/table.rb8
-rw-r--r--spec/engines/sql/unit/relations/table_spec.rb7
2 files changed, 0 insertions, 15 deletions
diff --git a/lib/arel/engines/sql/relations/table.rb b/lib/arel/engines/sql/relations/table.rb
index d9ff95265b..28c56a6bb0 100644
--- a/lib/arel/engines/sql/relations/table.rb
+++ b/lib/arel/engines/sql/relations/table.rb
@@ -73,14 +73,6 @@ module Arel
end
end
- def eql?(other)
- self == other
- end
-
- def hash
- @hash ||= :name.hash
- end
-
def column_for(attribute)
has_attribute?(attribute) and columns.detect { |c| c.name == attribute.name.to_s }
end
diff --git a/spec/engines/sql/unit/relations/table_spec.rb b/spec/engines/sql/unit/relations/table_spec.rb
index 6afd9964a4..1a0914006b 100644
--- a/spec/engines/sql/unit/relations/table_spec.rb
+++ b/spec/engines/sql/unit/relations/table_spec.rb
@@ -108,13 +108,6 @@ module Arel
end
end
- describe 'hashing' do
- it "implements hash equality" do
- Table.new(:users).should hash_the_same_as(Table.new(:users))
- Table.new(:users).should_not hash_the_same_as(Table.new(:photos))
- end
- end
-
describe '#engine' do
it "defaults to global engine" do
Table.engine = engine = Sql::Engine.new