lib/aws-eventstream/decoder.rb in aws-eventstream-1.0.2 vs lib/aws-eventstream/decoder.rb in aws-eventstream-1.0.3
- old
+ new
@@ -157,11 +157,11 @@
unless checksum == unpack_uint32(buffer)
raise Errors::PreludeChecksumError
end
buffer.rewind
- total_len, headers_len, _ = buffer.read.unpack("N*")
+ total_len, headers_len, _ = buffer.read.unpack('N*')
[total_len, headers_len, buffer]
end
def context(io, total_len, headers_len, prelude_buffer)
# buffer rest of the message except prelude length
@@ -232,18 +232,18 @@
end
# overhead decode helpers
def unpack_uint32(buffer)
- buffer.read(4).unpack("N")[0]
+ buffer.read(4).unpack('N')[0]
end
def unpack_uint16(buffer)
- buffer.read(2).unpack("S>")[0]
+ buffer.read(2).unpack('S>')[0]
end
def unpack_uint8(buffer)
- buffer.readbyte.unpack("C")[0]
+ buffer.readbyte.unpack('C')[0]
end
end
end
end