lib/submodules/ably-ruby/lib/ably/realtime/presence.rb in ably-rest-0.8.3 vs lib/submodules/ably-ruby/lib/ably/realtime/presence.rb in ably-rest-0.8.5

- old
+ new

@@ -403,11 +403,11 @@ protocol_message.callback do |message| change_state target_state, message if target_state deferrable_succeed deferrable, &success_block end - protocol_message.errback do |message, error| + protocol_message.errback do |error| change_state failed_state, error if failed_state deferrable_fail deferrable, error end end end @@ -417,22 +417,22 @@ EventMachine.next_tick { deferrable.succeed self, *args } # allow callback to be added to the returned Deferrable before calling succeed deferrable end def deferrable_fail(deferrable, *args, &block) - safe_yield block, self, *args if block_given? - EventMachine.next_tick { deferrable.fail self, *args } # allow errback to be added to the returned Deferrable + safe_yield block, *args if block_given? + EventMachine.next_tick { deferrable.fail *args } # allow errback to be added to the returned Deferrable deferrable end def send_presence_action_for_client(action, client_id, options = {}, &success_block) ensure_presence_publishable_on_connection deferrable = create_deferrable ensure_channel_attached(deferrable) do send_presence_protocol_message(action, client_id, options).tap do |protocol_message| protocol_message.callback { |message| deferrable_succeed deferrable, &success_block } - protocol_message.errback { |message, error| deferrable_fail deferrable, error } + protocol_message.errback { |error| deferrable_fail deferrable, error } end end end def attach_channel_then