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

Fix Ruby 2.7 deprecation warning #2104

Merged
merged 1 commit into from
Oct 5, 2020

Conversation

stanhu
Copy link
Contributor

@stanhu stanhu commented Sep 28, 2020

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
Copy link

grape-bot commented Sep 28, 2020

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

Generated by 🚫 danger

Copy link
Member

@dblock dblock left a comment

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.

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@dblock
Copy link
Member

dblock commented Sep 30, 2020

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
Copy link
Contributor Author

stanhu commented Sep 30, 2020

Done.

@dblock
Copy link
Member

dblock commented Sep 30, 2020

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
Copy link
Member

dblock commented Oct 5, 2020

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