lib/ably/modules/message_emitter.rb in ably-0.8.5 vs lib/ably/modules/message_emitter.rb in ably-0.8.6

- old
+ new

@@ -48,13 +48,11 @@ # # @return [void] # # @api private def emit_message(name, payload) - raise 'Event name is required' unless name - message_emitter_subscriptions[:all].each { |cb| cb.call(payload) } - message_emitter_subscriptions[name].each { |cb| cb.call(payload) } + message_emitter_subscriptions[name].each { |cb| cb.call(payload) } if name end private def message_emitter_subscriptions @message_emitter_subscriptions ||= Hash.new { |hash, key| hash[key] = [] }