From 412677cd1028efbf81e7c53a205cdeaa24c1aed7 Mon Sep 17 00:00:00 2001 From: vincent Date: Thu, 17 Jun 2021 09:45:54 +0200 Subject: [PATCH] fix storage for ruby 3.0 adapt storage#get_object with a block given. ruby 3 raises an error when instantiating a proc without a block @see https://blog.saeloun.com/2019/09/02/ruby-2-7-proc-without-block-warning.html --- lib/fog/aws/requests/storage/get_object.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/aws/requests/storage/get_object.rb b/lib/fog/aws/requests/storage/get_object.rb index 39cff00f3f..f28a072fb8 100644 --- a/lib/fog/aws/requests/storage/get_object.rb +++ b/lib/fog/aws/requests/storage/get_object.rb @@ -50,7 +50,7 @@ def get_object(bucket_name, object_name, options = {}, &block) idempotent = true if block_given? - params[:response_block] = Proc.new + params[:response_block] = Proc.new(&block) idempotent = false end