mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
No need to stringify event names (= method names) that always are Symbols
This commit is contained in:
parent
520111096f
commit
ffd74f58b0
1 changed files with 3 additions and 3 deletions
|
@ -81,7 +81,7 @@ module ActiveSupport
|
|||
attr_reader :subscriber, :notifier, :namespace
|
||||
|
||||
def add_event_subscriber(event) # :doc:
|
||||
return if invalid_event?(event.to_s)
|
||||
return if invalid_event?(event)
|
||||
|
||||
pattern = prepare_pattern(event)
|
||||
|
||||
|
@ -92,7 +92,7 @@ module ActiveSupport
|
|||
end
|
||||
|
||||
def remove_event_subscriber(event) # :doc:
|
||||
return if invalid_event?(event.to_s)
|
||||
return if invalid_event?(event)
|
||||
|
||||
pattern = prepare_pattern(event)
|
||||
|
||||
|
@ -107,7 +107,7 @@ module ActiveSupport
|
|||
end
|
||||
|
||||
def invalid_event?(event)
|
||||
%w{ start finish }.include?(event.to_s)
|
||||
%i{ start finish }.include?(event.to_sym)
|
||||
end
|
||||
|
||||
def prepare_pattern(event)
|
||||
|
|
Loading…
Reference in a new issue