diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-19 10:21:45 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-19 10:21:45 -0700 |
commit | dd4e81df86a119a32d52396c4ef856c856b7965a (patch) | |
tree | bb81727ac2bf0991ef96b012a9ee9841914f32d3 /activesupport | |
parent | bd4b3d8b2fc6b657ca2981582f8736842ac500d0 (diff) | |
download | rails-dd4e81df86a119a32d52396c4ef856c856b7965a.tar.gz rails-dd4e81df86a119a32d52396c4ef856c856b7965a.tar.bz2 rails-dd4e81df86a119a32d52396c4ef856c856b7965a.zip |
avoid call to Array#first
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/notifications/fanout.rb | 6 |
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 |