aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/notifications
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/notifications')
-rw-r--r--activesupport/lib/active_support/notifications/fanout.rb14
1 files changed, 2 insertions, 12 deletions
diff --git a/activesupport/lib/active_support/notifications/fanout.rb b/activesupport/lib/active_support/notifications/fanout.rb
index fa469c8b79..6dfc3c0a99 100644
--- a/activesupport/lib/active_support/notifications/fanout.rb
+++ b/activesupport/lib/active_support/notifications/fanout.rb
@@ -45,7 +45,7 @@ module ActiveSupport
def publish(*args)
return unless subscribed_to?(args.first)
- push(*args)
+ @block.call(*args)
true
end
@@ -58,19 +58,9 @@ module ActiveSupport
end
def matches?(subscriber_or_name)
- case subscriber_or_name
- when String
+ self === subscriber_or_name ||
@pattern && @pattern === subscriber_or_name
- when self
- true
- end
end
-
- private
-
- def push(*args)
- @block.call(*args)
- end
end
end
end