Skip to content

Commit

Permalink
bind method is not needed, so goodbye! <3 <3 <3
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Jul 18, 2010
1 parent 3870366 commit 2cbef69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/notifications.rb
Expand Up @@ -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)
Expand Down
8 changes: 1 addition & 7 deletions activesupport/lib/active_support/notifications/fanout.rb
Expand Up @@ -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
Expand Down

0 comments on commit 2cbef69

Please sign in to comment.