lib/ably/realtime/presence.rb in ably-0.8.7 vs lib/ably/realtime/presence.rb in ably-0.8.8
- old
+ new
@@ -248,15 +248,15 @@
deferrable = create_deferrable
ensure_channel_attached(deferrable) do
members.get(options).tap do |members_map_deferrable|
members_map_deferrable.callback do |*args|
- safe_yield block, *args if block_given?
- deferrable.succeed *args
+ safe_yield(block, *args) if block_given?
+ deferrable.succeed(*args)
end
members_map_deferrable.errback do |*args|
- deferrable.fail *args
+ deferrable.fail(*args)
end
end
end
end
@@ -424,17 +424,17 @@
end
end
end
def deferrable_succeed(deferrable, *args, &block)
- safe_yield block, self, *args if block_given?
+ safe_yield(block, self, *args) if block_given?
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, *args if block_given?
- EventMachine.next_tick { deferrable.fail *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