Skip to content

Silence warnings triggered by Ruby 2.7 #116

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

Merged
merged 2 commits into from
Feb 26, 2020
Merged

Silence warnings triggered by Ruby 2.7 #116

merged 2 commits into from
Feb 26, 2020

Conversation

kytrinyx
Copy link
Contributor

Ruby 2.7 adds some new warnings. In particular, previously if a method was
defined with keyword arguments, you could create a hash and pass it to the
method, and Ruby wouldn't complain.

Now, however, Ruby wants you to explicitly pass **the_hash instead of just
the_hash where keyword arguments are expected.

The version of public_suffix that this codebase was relying on emitted the
following warnings:

lib/ruby/gems/2.7.0/gems/public_suffix-3.1.1/lib/public_suffix/list.rb:51:
   warning: Using the last argument as keyword parameters is
deprecated;
   maybe ** should be added to the call
lib/public_suffix/list.rb:69:
   warning: The called method `parse' is defined here

v4.0.3 fixes these warnings.

I had to set the version specifier in the gemspec to >= 3.0 in order to manage
to upgrade github/github, otherwise bundler gets its dependencies in a tizzy.

Once github/github is updated, we could update this to be ~> 4.0

Katrina Owen added 2 commits February 26, 2020 13:30
Ruby 2.7 adds some new warnings. In particular, previously if a method
was defined with keyword arguments, you could create a hash and pass it to
the method, and Ruby wouldn't complain.

Now, however, Ruby wants you to explicitly pass **the_hash instead of just
the_hash where keyword arguments are expected.

The version of public_suffix that this codebase was relying on emitted the
following warnings:

    lib/ruby/gems/2.7.0/gems/public_suffix-3.1.1/lib/public_suffix/list.rb:51:
         warning: Using the last argument as keyword parameters is deprecated;
         maybe ** should be added to the call
    lib/public_suffix/list.rb:69:
         warning: The called method `parse' is defined here

v4.0.3 fixes these warnings.

I had to set the version specifier in the gemspec to >= 3.0 in order to
manage to upgrade github/github, otherwise bundle gets its dependencies
in a tizzy.

Once github/github is updated, we could update this to be ~> 4.0
Copy link
Contributor

@parkr parkr left a comment

Choose a reason for hiding this comment

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

💞

@kytrinyx kytrinyx merged commit 9f0159a into master Feb 26, 2020
@kytrinyx kytrinyx deleted the ruby-2-7-warnings branch February 26, 2020 20:45
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.

2 participants