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 keyword argument warnings for specs for Ruby 2.7 #15

Merged

Conversation

splattael
Copy link
Contributor

When running specs via RUBYOPT="-W:deprecated" rake Ruby 2.7 emits
with following warnings:

<path>/test/simplecov-cobertura_test.rb:12:
warning: Passing the keyword argument as the last hash parameter is
deprecated
<path>/installs/ruby/2.7.2/lib/ruby/gems/2.7.0/gems/simplecov-0.19.1/lib/simplecov/result.rb:28:
warning: The called method `initialize' is defined here

This commit fixes the warning.

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

Screenshots

Console output before and after when running Ruby 2.7 with RUBYOPT="-W:depricated":

Before After
Screenshot from 2020-11-19 13-20-32 Screenshot from 2020-11-19 13-20-47

When running specs via `RUBYOPT="-W:deprecated" rake` Ruby 2.7 emits
with following warnings:

<path>/test/simplecov-cobertura_test.rb:12:
warning: Passing the keyword argument as the last hash parameter is
deprecated
<path>/installs/ruby/2.7.2/lib/ruby/gems/2.7.0/gems/simplecov-0.19.1/lib/simplecov/result.rb:28:
warning: The called method `initialize' is defined here

This commit fixes the warning.

See also
https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
@jessebs jessebs merged commit c9ae437 into dashingrocket:master Nov 19, 2020
@jessebs
Copy link
Contributor

jessebs commented Nov 19, 2020

Thank you very much for this fix!

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.

None yet

2 participants