aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authoryui-knk <spiketeika@gmail.com>2015-11-11 15:15:26 +0900
committeryui-knk <spiketeika@gmail.com>2015-11-12 11:02:49 +0900
commita98475c2df8ab7d7d353cb29bb3f201c4c7eb9d1 (patch)
tree10b90a72d3af01d54876b4632432b0fb7db993d0 /activerecord/test
parent5388464af6ec229ddf3a1040cd7466f45370cedd (diff)
downloadrails-a98475c2df8ab7d7d353cb29bb3f201c4c7eb9d1.tar.gz
rails-a98475c2df8ab7d7d353cb29bb3f201c4c7eb9d1.tar.bz2
rails-a98475c2df8ab7d7d353cb29bb3f201c4c7eb9d1.zip
Make `AR::SpawnMethods#merge!` to check an arg is a Proc
From Ruby ( 2.3.0dev trunk 52520), `Hash#to_proc` is defined (https://github.com/ruby/ruby/commit/fbe967ec02cb65a7efa3fb8f3d747cf6f620dde1), and many tests have been failed with `ArgumentError: wrong number of arguments (given 0, expected 1)`. Because we call `Hash#to_proc` with no args in `#merge!`. This commit changes order of conditionals to not call `Hash#to_proc`.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/relation_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation_test.rb b/activerecord/test/cases/relation_test.rb
index 8794bc8043..b58052a962 100644
--- a/activerecord/test/cases/relation_test.rb
+++ b/activerecord/test/cases/relation_test.rb
@@ -24,6 +24,10 @@ module ActiveRecord
def self.sanitize_sql_for_order(sql)
sql
end
+
+ def self.arel_table
+ Post.arel_table
+ end
end
def test_construction