diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-18 15:37:23 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-18 15:37:23 -0700 |
commit | 2cbef6996c41c785a626291ce29b934797359fd2 (patch) | |
tree | deaa204cee54c8f1d9400d1b3753d6d8cae8cb10 | |
parent | 387036609268c4cf68401a1333715f2ee4aecffc (diff) | |
download | rails-2cbef6996c41c785a626291ce29b934797359fd2.tar.gz rails-2cbef6996c41c785a626291ce29b934797359fd2.tar.bz2 rails-2cbef6996c41c785a626291ce29b934797359fd2.zip |
bind method is not needed, so goodbye! <3 <3 <3
-rw-r--r-- | activesupport/lib/active_support/notifications.rb | 2 | ||||
-rw-r--r-- | 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 |