diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2019-03-10 16:31:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-10 16:31:15 +0100 |
commit | c87f6841b77e5827ca7bd03a629e2d615fae0d06 (patch) | |
tree | 8e62191b003d0dd096578566f891b66449191a57 /activesupport/lib | |
parent | 08a93efab6bdf10ba7afafb6e51f4b7809c97ebc (diff) | |
parent | c99e673902539a0bb1762a8786671f812076c2d9 (diff) | |
download | rails-c87f6841b77e5827ca7bd03a629e2d615fae0d06.tar.gz rails-c87f6841b77e5827ca7bd03a629e2d615fae0d06.tar.bz2 rails-c87f6841b77e5827ca7bd03a629e2d615fae0d06.zip |
Merge pull request #35121 from utilum/warning_tried_to_create_proc_without_block
Ruby 2.7 warning: creating a Proc without a block
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/notifications/fanout.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/notifications/fanout.rb b/activesupport/lib/active_support/notifications/fanout.rb index f06504cf2c..c506b35b1e 100644 --- a/activesupport/lib/active_support/notifications/fanout.rb +++ b/activesupport/lib/active_support/notifications/fanout.rb @@ -20,8 +20,8 @@ module ActiveSupport super end - def subscribe(pattern = nil, block = Proc.new) - subscriber = Subscribers.new pattern, block + def subscribe(pattern = nil, callable = nil, &block) + subscriber = Subscribers.new(pattern, callable || block) synchronize do if String === pattern @string_subscribers[pattern] << subscriber |