lib/submodules/ably-ruby/lib/ably/realtime/presence.rb in ably-rest-1.0.5 vs lib/submodules/ably-ruby/lib/ably/realtime/presence.rb in ably-rest-1.0.6

- old
+ new

@@ -69,11 +69,11 @@ requirements_failed_deferrable = ensure_presence_publishable_on_connection_deferrable return requirements_failed_deferrable if requirements_failed_deferrable ensure_channel_attached(deferrable) do if entering? - once_or_if(STATE.Entered, else: proc { |args| deferrable_fail deferrable, *args }) do + once_or_if(STATE.Entered, else: lambda { |args| deferrable_fail deferrable, *args }) do deferrable_succeed deferrable, &success_block end else current_state = state change_state STATE.Entering @@ -130,11 +130,11 @@ requirements_failed_deferrable = ensure_presence_publishable_on_connection_deferrable return requirements_failed_deferrable if requirements_failed_deferrable ensure_channel_attached(deferrable) do if leaving? - once_or_if(STATE.Left, else: proc { |error|deferrable_fail deferrable, *args }) do + once_or_if(STATE.Left, else: lambda { |error|deferrable_fail deferrable, *args }) do deferrable_succeed deferrable, &success_block end else current_state = state change_state STATE.Leaving @@ -308,10 +308,10 @@ # @!attribute [r] __incoming_msgbus__ # @return [Ably::Util::PubSub] Client library internal channel incoming protocol message bus # @api private def __incoming_msgbus__ @__incoming_msgbus__ ||= Ably::Util::PubSub.new( - coerce_into: Proc.new { |event| Ably::Models::ProtocolMessage::ACTION(event) } + coerce_into: lambda { |event| Ably::Models::ProtocolMessage::ACTION(event) } ) end # Used by {Ably::Modules::StateEmitter} to debug action changes # @api private