aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/notifications
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-19 10:21:45 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-19 10:21:45 -0700
commitdd4e81df86a119a32d52396c4ef856c856b7965a (patch)
treebb81727ac2bf0991ef96b012a9ee9841914f32d3 /activesupport/lib/active_support/notifications
parentbd4b3d8b2fc6b657ca2981582f8736842ac500d0 (diff)
downloadrails-dd4e81df86a119a32d52396c4ef856c856b7965a.tar.gz
rails-dd4e81df86a119a32d52396c4ef856c856b7965a.tar.bz2
rails-dd4e81df86a119a32d52396c4ef856c856b7965a.zip
avoid call to Array#first
Diffstat (limited to 'activesupport/lib/active_support/notifications')
-rw-r--r--activesupport/lib/active_support/notifications/fanout.rb6
1 files changed, 3 insertions, 3 deletions
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