Skip to content

ruby 2.7.1 deprecation warnings #890

Closed
@josh-m-sharpe

Description

It seems that creating a request object in this manner results in deprecation warnings stemming from ruby 2.7.1. This rails issue seems related: rails/rails#38202

I didn't see an issue anywhere that was tracking these deprecations. Apologies if this is already tracked.

request = Google::Apis::SheetsV4::BatchUpdateSpreadsheetRequest.new({
  requests: [{
    add_sheet: Google::Apis::SheetsV4::AddSheetRequest.new({
      properties: Google::Apis::SheetsV4::SheetProperties.new({
        title: "Some Title"
      })
    })
  }]
})

response = client.batch_update_spreadsheet(SPREADSHEET_ID, request)
(irb):67: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/me/.rvm/gems/ruby-2.7.1/gems/google-api-client-0.41.2/generated/google/apis/sheets_v4/classes.rb:8979: warning: The called method `initialize' is defined here
(irb):66: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/me/.rvm/gems/ruby-2.7.1/gems/google-api-client-0.41.2/generated/google/apis/sheets_v4/classes.rb:311: warning: The called method `initialize' is defined here
(irb):64: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/me/.rvm/gems/ruby-2.7.1/gems/google-api-client-0.41.2/generated/google/apis/sheets_v4/classes.rb:2014: warning: The called method `initialize' is defined here```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions