Can't stream blob, Ruby 3+ raises exception without explicit &block in Proc.new
ttilberg opened this issue · comments
Tim Tilberg commented
Similar to the issue in the AWS S3 adapter: fog/fog-aws@412677c
Ruby 3 has deprecated the ability to call Proc.new
without a block explicitly passed in.
The api that streams blob contents uses this move, so does not work in Ruby 3+
It's already capturing the &block in the args anyway, and is an easy patch:
def get_blob_with_block_given(container_name, blob_name, options, &_block)
Rather than implicit Proc.new
:
Proc.new.call('', 0, 0)
Pass the block explicitly.
Proc.new(&_block).call('', 0, 0)
Updating each of the instances has allowed me to stream blobs down.