From ffcb8c70837a46284bf1719aad6f26b89d6a04e1 Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Mon, 22 Jan 2024 23:21:50 +0800 Subject: [PATCH] Weird rubocop refactor --- lib/packet.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/packet.rb b/lib/packet.rb index b295aa3..31b4987 100644 --- a/lib/packet.rb +++ b/lib/packet.rb @@ -30,11 +30,11 @@ class Packet return unless flags_compressed @payload = @huffman.decompress(@payload.unpack('C*')) - if @payload.nil? - @payload = '' - else - @payload = @payload.pack('C*') - end + @payload = if @payload.nil? + '' + else + @payload.pack('C*') + end end def annotate_first_row(bytes)