aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2019-07-21 19:34:59 -0300
committerGitHub <noreply@github.com>2019-07-21 19:34:59 -0300
commitef4d3215b1198c456780b8d18aa62be7795b9b8c (patch)
treef7c57fc651f4f1e67e41cf1c7c9928a520d695e9 /activemodel/lib
parenta390001bbe482619e3a00186d23421e93f8e8c39 (diff)
parentab21db050d9cd64628768af3fa4b650550667550 (diff)
downloadrails-ef4d3215b1198c456780b8d18aa62be7795b9b8c.tar.gz
rails-ef4d3215b1198c456780b8d18aa62be7795b9b8c.tar.bz2
rails-ef4d3215b1198c456780b8d18aa62be7795b9b8c.zip
Merge pull request #36721 from Edouard-chin/ec-errors-each
Fix deprecation on `AM::Errors` when each is called indirectly
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/errors.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb
index 22839bd9fb..5628a59845 100644
--- a/activemodel/lib/active_model/errors.rb
+++ b/activemodel/lib/active_model/errors.rb
@@ -220,7 +220,7 @@ module ActiveModel
# # then yield :name and "must be specified"
# end
def each(&block)
- if block.arity == 1
+ if block.arity <= 1
@errors.each(&block)
else
ActiveSupport::Deprecation.warn(<<~MSG)