diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-06 17:50:45 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-06 17:53:06 -0200 |
commit | b71e08f8ba0447971553452a00917d00020edd35 (patch) | |
tree | 9cbd1f697da46c6f33dacefe85849ddd1aaadaf9 /activerecord/lib/active_record/relation/spawn_methods.rb | |
parent | e26fa7b9216443c4dfcb887694afbefa70a9e450 (diff) | |
download | rails-b71e08f8ba0447971553452a00917d00020edd35.tar.gz rails-b71e08f8ba0447971553452a00917d00020edd35.tar.bz2 rails-b71e08f8ba0447971553452a00917d00020edd35.zip |
Raise ArgumentError when passing nil to Relation#merge
nil or false should not be valid argument to the merge method.
Closes #12264
Diffstat (limited to 'activerecord/lib/active_record/relation/spawn_methods.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/spawn_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb index dd3610d7aa..70da37fa84 100644 --- a/activerecord/lib/active_record/relation/spawn_methods.rb +++ b/activerecord/lib/active_record/relation/spawn_methods.rb @@ -32,7 +32,7 @@ module ActiveRecord elsif other spawn.merge!(other) else - self + raise ArgumentError, "invalid argument: #{other.inspect}." end end |