lib/fastdfs-client/proto_common.rb in fastdfs-client-1.3.0 vs lib/fastdfs-client/proto_common.rb in fastdfs-client-1.4.0
- old
+ new
@@ -18,10 +18,10 @@
SET_METADATA_FLAG_OVERWRITE = "O"
SET_METADATA_FLAG_MERGE = "M"
def self.header_bytes(cmd, hex_long, erron=0)
- hex_bytes = Utils.number_to_buffer(hex_long)
+ hex_bytes = hex_long.to_eight_buffer
header = hex_bytes.fill(0, hex_bytes.length...HEAD_LEN)
header[8] = cmd
header[9] = erron
header
end
\ No newline at end of file