From 5be6f38c4c8f1377f58ac5b6ca4e2d2fbfb2c68a Mon Sep 17 00:00:00 2001 From: Eric-Guo Date: Wed, 29 Apr 2020 17:32:34 +0800 Subject: [PATCH] rubocop suggestion change --- lib/wechat/cipher.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wechat/cipher.rb b/lib/wechat/cipher.rb index 050f654e..a2cdb657 100644 --- a/lib/wechat/cipher.rb +++ b/lib/wechat/cipher.rb @@ -41,7 +41,7 @@ def pack(content, app_id) def unpack(msg) msg = decode_padding(msg) - msg_len = msg[16, 4].reverse.unpack('V')[0] + msg_len = msg[16, 4].reverse.unpack1('V') content = msg[20, msg_len] app_id = msg[(20 + msg_len)..-1]