lib/ably/realtime/channel.rb in ably-0.8.7 vs lib/ably/realtime/channel.rb in ably-0.8.8

- old
+ new

@@ -292,11 +292,13 @@ # As we are using a state machine, do not allow change_state to be used # #transition_state_machine must be used instead private :change_state private - attr_reader :queue + def queue + @queue + end def setup_event_handlers __incoming_msgbus__.subscribe(:message) do |message| message.decode self emit_message message.name, message @@ -321,11 +323,11 @@ raise Ably::Exceptions::IncompatibleClientId.new("Cannot publish with client_id '#{message.client_id}' as it is incompatible with the current configured client_id '#{client.client_id}'", 400, 40012) end end end - queue.push *messages + queue.push(*messages) if attached? process_queue else attach @@ -383,11 +385,11 @@ messages: messages ) end def create_message(message) - Ably::Models::Message(message.dup).tap do |message| - message.encode self + Ably::Models::Message(message.dup).tap do |msg| + msg.encode self end end def rest_channel client.rest_client.channel(name)