aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/deprecation/reporting.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/deprecation/reporting.rb')
-rw-r--r--activesupport/lib/active_support/deprecation/reporting.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/deprecation/reporting.rb b/activesupport/lib/active_support/deprecation/reporting.rb
index 03c445ffbf..49d58cd3a1 100644
--- a/activesupport/lib/active_support/deprecation/reporting.rb
+++ b/activesupport/lib/active_support/deprecation/reporting.rb
@@ -4,8 +4,9 @@ module ActiveSupport
attr_accessor :silenced
def warn(message = nil, callstack = caller)
- if behavior && !silenced
- behavior.call(deprecation_message(callstack, message), callstack)
+ return if silenced
+ deprecation_message(callstack, message).tap do |m|
+ behavior.each { |b| b.call(m, callstack) }
end
end