mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
avoid call to Array#first
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user