From: Daniel Leidert <dleidert@debian.org>
Date: Thu, 25 Nov 2021 15:36:47 +0100
Subject: Fix Ruby 3.0 ArgumentError

Bug: https://github.com/marcandre/packable/issues/15
Bug-Debian: https://bugs.debian.org/996345
Forwarded: https://github.com/marcandre/packable/issues/15
---
 lib/packable/extensions/io.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/packable/extensions/io.rb b/lib/packable/extensions/io.rb
index c8f7e89..75dd99f 100644
--- a/lib/packable/extensions/io.rb
+++ b/lib/packable/extensions/io.rb
@@ -73,7 +73,7 @@ module Packable
 
       def each_with_packing(*options, &block)
         return each_without_packing(*options, &block) if options.empty? || (Integer === options.first) || (String === options.first) || !seekable?
-        return Enumerator.new(self, :each_with_packing, *options) unless block_given?
+        return self.to_enum(__method__, *options) unless block_given?
         yield read(*options) until eof?
       end
 
