Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby 3 does not support Proc.new without arguments #571

Merged
merged 1 commit into from
Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fog.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ my_google_credentials:
#google_storage_access_key_id: GOOGXXXXXXXXXXXXXXXX
#google_storage_secret_access_key: XXXX+XXX/XXXXXXXX+XXXXXXXXXXXXXXXXXXXXX
# /END GOOGLE CONFIG
#################################################################
#################################################################
4 changes: 2 additions & 2 deletions lib/fog/storage/google_xml/requests/get_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Real
# * 'ETag'<~String> - Etag of object
# * 'Last-Modified'<~String> - Last modified timestamp for object
#
def get_object(bucket_name, object_name, options = {}, &_block)
def get_object(bucket_name, object_name, options = {}, &block)
raise ArgumentError.new("bucket_name is required") unless bucket_name
raise ArgumentError.new("object_name is required") unless object_name

Expand All @@ -40,7 +40,7 @@ def get_object(bucket_name, object_name, options = {}, &_block)
params[:headers]["If-Unmodified-Since"] = Fog::Time.at(options["If-Unmodified-Since"].to_i).to_date_header
end

params[:response_block] = Proc.new if block_given?
params[:response_block] = block if block_given?

request(params.merge!(:expects => [200, 206],
:host => "#{bucket_name}.#{@host}",
Expand Down