lib/ably/realtime/channel.rb in ably-1.0.5 vs lib/ably/realtime/channel.rb in ably-1.0.6

- old
+ new

@@ -91,11 +91,11 @@ # @param name [String] The name of the channel # @param channel_options [Hash] Channel options, currently reserved for Encryption options # @option channel_options [Hash,Ably::Models::CipherParams] :cipher A hash of options or a {Ably::Models::CipherParams} to configure the encryption. *:key* is required, all other options are optional. See {Ably::Util::Crypto#initialize} for a list of +:cipher+ options # def initialize(client, name, channel_options = {}) - ensure_utf_8 :name, name + name = ensure_utf_8(:name, name) update_options channel_options @client = client @name = name @queue = [] @@ -157,11 +157,11 @@ end messages = if name.kind_of?(Enumerable) name else - ensure_utf_8 :name, name, allow_nil: true + name = ensure_utf_8(:name, name, allow_nil: true) ensure_supported_payload data [{ name: name, data: data }.merge(attributes)] end queue_messages(messages).tap do |deferrable| @@ -289,10 +289,10 @@ # @!attribute [r] __incoming_msgbus__ # @return [Ably::Util::PubSub] Client library internal channel incoming 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 # @api private def set_channel_error_reason(error)