Skip to content

Fix Ruby 2.7 deprecation warning#2104

Merged
dblock merged 1 commit into
ruby-grape:masterfrom
stanhu:sh-fix-ruby-2.7-kwargs
Oct 5, 2020
Merged

Fix Ruby 2.7 deprecation warning#2104
dblock merged 1 commit into
ruby-grape:masterfrom
stanhu:sh-fix-ruby-2.7-kwargs

Conversation

@stanhu

@stanhu stanhu commented Sep 28, 2020

Copy link
Copy Markdown
Contributor

This fixes the warning:

ruby/2.7.0/gems/grape-1.4.0/lib/grape/dsl/inside_route.rb: warning:
Using the last argument as keyword parameters is deprecated; maybe **
should be added to the call

More details:
https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/

@grape-bot

grape-bot commented Sep 28, 2020

Copy link
Copy Markdown
1 Warning
⚠️ There’re library changes, but not tests. That’s OK as long as you’re refactoring existing code.

Generated by 🚫 danger

@stanhu stanhu force-pushed the sh-fix-ruby-2.7-kwargs branch from 13044ef to 6996194 Compare September 28, 2020 16:06

@dblock dblock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to merge on CHANGELOG + Green build, thank you.

Comment thread CHANGELOG.md
Comment thread CHANGELOG.md Outdated
@stanhu stanhu force-pushed the sh-fix-ruby-2.7-kwargs branch from 6996194 to f3d265c Compare September 28, 2020 16:33
@dblock

dblock commented Sep 30, 2020

Copy link
Copy Markdown
Member

Rebase?

This fixes the warning:

```
ruby/2.7.0/gems/grape-1.4.0/lib/grape/dsl/inside_route.rb: warning:
Using the last argument as keyword parameters is deprecated; maybe **
should be added to the call
```

More details:
https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
@stanhu stanhu force-pushed the sh-fix-ruby-2.7-kwargs branch from f3d265c to 9b678f4 Compare September 30, 2020 15:47
@stanhu

stanhu commented Sep 30, 2020

Copy link
Copy Markdown
Contributor Author

Done.

@dblock

dblock commented Sep 30, 2020

Copy link
Copy Markdown
Member

Before I merge, there are other similar deprecation warnings in the spec runs, want to fix those too?

e.g.

Grape::API::Helpers
/home/travis/build/ruby-grape/grape/lib/grape/validations/validators/coerce.rb:21: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/travis/build/ruby-grape/grape/lib/grape/validations/validators/base.rb:16: warning: The called method `initialize' is defined here

@dblock dblock merged commit 545963c into ruby-grape:master Oct 5, 2020
@dblock

dblock commented Oct 5, 2020

Copy link
Copy Markdown
Member

I've merged this one for now.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants