From dd4e81df86a119a32d52396c4ef856c856b7965a Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 19 Jul 2010 10:21:45 -0700 Subject: avoid call to Array#first --- activesupport/lib/active_support/notifications/fanout.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activesupport/lib/active_support/notifications/fanout.rb') diff --git a/activesupport/lib/active_support/notifications/fanout.rb b/activesupport/lib/active_support/notifications/fanout.rb index 3bbb9cca44..526ca26764 100644 --- a/activesupport/lib/active_support/notifications/fanout.rb +++ b/activesupport/lib/active_support/notifications/fanout.rb @@ -38,9 +38,9 @@ module ActiveSupport @delegate = delegate end - def publish(*args) - return unless subscribed_to?(args.first) - @delegate.call(*args) + def publish(message, *args) + return unless subscribed_to?(message) + @delegate.call(message, *args) true end -- cgit v1.2.3