aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-05-11 23:43:18 +0100
committerJon Leighton <j@jonathanleighton.com>2012-05-11 23:44:55 +0100
commit2091e5a65e2950689ad3242d67fdd7b15aa3411b (patch)
tree42e0830bfa6c65a78ee361533b8d6ad51b4adeca /activerecord
parentfbf1858ed9fdb98f1489e045936d871978de928f (diff)
downloadrails-2091e5a65e2950689ad3242d67fdd7b15aa3411b.tar.gz
rails-2091e5a65e2950689ad3242d67fdd7b15aa3411b.tar.bz2
rails-2091e5a65e2950689ad3242d67fdd7b15aa3411b.zip
Remove #=== quirk
Makes it consistent with Relation. Can't see a use for this.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/associations/collection_proxy.rb6
-rw-r--r--activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb5
-rw-r--r--activerecord/test/cases/associations/has_many_associations_test.rb6
3 files changed, 0 insertions, 17 deletions
diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb
index b3e46d3707..cf4cc98f38 100644
--- a/activerecord/lib/active_record/associations/collection_proxy.rb
+++ b/activerecord/lib/active_record/associations/collection_proxy.rb
@@ -79,12 +79,6 @@ module ActiveRecord
load_target == other
end
- # Forwards <tt>===</tt> explicitly to the \target because the instance method
- # removal above doesn't catch it. Loads the \target if needed.
- def ===(other)
- other === load_target
- end
-
def to_ary
load_target.dup
end
diff --git a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
index cd581485d5..470f0c3fd3 100644
--- a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb
@@ -123,11 +123,6 @@ class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase
assert active_record.developers.include?(david)
end
- def test_triple_equality
- assert !(Array === Developer.find(1).projects)
- assert Developer.find(1).projects === Array
- end
-
def test_adding_single
jamis = Developer.find(2)
jamis.projects.reload # causing the collection to load
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb
index 47ad6a1ba7..13d8c68b33 100644
--- a/activerecord/test/cases/associations/has_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_associations_test.rb
@@ -326,12 +326,6 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
authors(:david).readonly_comments.each { |c| assert c.readonly? }
end
- def test_triple_equality
- # sometimes tests on Oracle fail if ORDER BY is not provided therefore add always :order with :first
- assert !(Array === Firm.scoped(:order => "id").first.clients)
- assert Firm.scoped(:order => "id").first.clients === Array
- end
-
def test_finding_default_orders
assert_equal "Summit", Firm.scoped(:order => "id").first.clients.first.name
end