Skip to content

Commit 80dcda6

Browse files
fix: should not reuse buffers for IO.copy_stream interop
1 parent 2b7d54e commit 80dcda6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/imagekit/internal/util.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,10 +473,9 @@ class << self
473473
# @return [Enumerable<String>]
474474
def writable_enum(&blk)
475475
Enumerator.new do |y|
476-
buf = String.new
477476
y.define_singleton_method(:write) do
478-
self << buf.replace(_1)
479-
buf.bytesize
477+
self << _1.dup
478+
_1.bytesize
480479
end
481480

482481
blk.call(y)

0 commit comments

Comments
 (0)