motion/reactor/eventable.rb in bubble-wrap-1.7.1 vs motion/reactor/eventable.rb in bubble-wrap-1.8.0

- old
+ new

@@ -16,11 +16,13 @@ # block any more def off(event, method = nil, &blk) events = _events_for_key(event) if method events.delete_if { |m| m.receiver == method.receiver and m.name == method.name } - else + elsif blk events.delete_if { |b| b == blk } + else + __events__[event] = Array.new end blk end # Trigger an event