about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-20 00:51:43 -0500
committerGitHub <noreply@github.com>2023-02-20 06:51:43 +0100
commitd2dcb6c45a9db5439772f0553046e2c03a739a16 (patch)
tree1cfd9390ef2010ad8516f724d09bd02955de7764 /lib
parent5116347eb7cfd0a09f55efbd84f8d3fa11d4d6ba (diff)
Autofix Rubocop Style/UnpackFirst (#23741)
Diffstat (limited to 'lib')
-rw-r--r--lib/paperclip/gif_transcoder.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/paperclip/gif_transcoder.rb b/lib/paperclip/gif_transcoder.rb
index d14465c01..f385b00a3 100644
--- a/lib/paperclip/gif_transcoder.rb
+++ b/lib/paperclip/gif_transcoder.rb
@@ -57,7 +57,7 @@ class GifReader
           end
 
           # Skip lzw min code size
-          raise InvalidValue unless s.read(1).unpack('C')[0] >= 2
+          raise InvalidValue unless s.read(1).unpack1('C') >= 2
 
           # Skip image data sub-blocks
           skip_sub_blocks!(s)
@@ -77,7 +77,7 @@ class GifReader
   private
 
   def skip_extension_block!(file)
-    if EXTENSION_LABELS.include?(file.read(1).unpack('C')[0])
+    if EXTENSION_LABELS.include?(file.read(1).unpack1('C'))
       block_size, = file.read(1).unpack('C')
       file.seek(block_size, IO::SEEK_CUR)
     end