lib/submodules/ably-ruby/lib/ably/models/message.rb in ably-rest-0.8.2 vs lib/submodules/ably-ruby/lib/ably/models/message.rb in ably-rest-0.8.3

- old
+ new

@@ -90,15 +90,13 @@ def hash @hash_object end - def as_json(*args) - raise RuntimeError, ':name is missing, cannot generate a valid Hash for Message' unless name - - hash.dup.tap do |message| + def to_json(*args) + as_json(*args).tap do |message| decode_binary_data_before_to_json message - end.as_json + end.to_json end # Assign this message to a ProtocolMessage before delivery to the Ably system # @api private def assign_to_protocol_message(protocol_message)