From 2cbef6996c41c785a626291ce29b934797359fd2 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sun, 18 Jul 2010 15:37:23 -0700 Subject: [PATCH] bind method is not needed, so goodbye! <3 <3 <3 --- activesupport/lib/active_support/notifications.rb | 2 +- activesupport/lib/active_support/notifications/fanout.rb | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/activesupport/lib/active_support/notifications.rb b/activesupport/lib/active_support/notifications.rb index 1444fc1609..bb5f497c83 100644 --- a/activesupport/lib/active_support/notifications.rb +++ b/activesupport/lib/active_support/notifications.rb @@ -65,7 +65,7 @@ module ActiveSupport end def subscribe(pattern = nil, &block) - @queue.bind(pattern).subscribe(&block) + @queue.subscribe(pattern, &block) end def unsubscribe(subscriber) diff --git a/activesupport/lib/active_support/notifications/fanout.rb b/activesupport/lib/active_support/notifications/fanout.rb index 7eefb7f20a..48ccb156ae 100644 --- a/activesupport/lib/active_support/notifications/fanout.rb +++ b/activesupport/lib/active_support/notifications/fanout.rb @@ -6,15 +6,9 @@ module ActiveSupport def initialize @subscribers = [] @listeners_for = {} - @pattern = nil end - def bind(pattern) - @pattern = pattern - self - end - - def subscribe(pattern = @pattern, &block) + def subscribe(pattern = nil, &block) @listeners_for.clear @subscribers << Subscriber.new(pattern, &block) @subscribers.last