Permalink
Browse files

avoid call to Array#first

  • Loading branch information...
1 parent bd4b3d8 commit dd4e81df86a119a32d52396c4ef856c856b7965a @tenderlove tenderlove committed Jul 19, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 activesupport/lib/active_support/notifications/fanout.rb
@@ -38,9 +38,9 @@ def initialize(pattern, delegate)
@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

0 comments on commit dd4e81d

Please sign in to comment.