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 1444fc1609e63..bb5f497c839df 100644 --- a/activesupport/lib/active_support/notifications.rb +++ b/activesupport/lib/active_support/notifications.rb @@ -65,7 +65,7 @@ def publish(*args) 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 7eefb7f20a6d5..48ccb156ae961 100644 --- a/activesupport/lib/active_support/notifications/fanout.rb +++ b/activesupport/lib/active_support/notifications/fanout.rb @@ -6,15 +6,9 @@ class Fanout 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