Navigation Menu

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

Suppress deprecation warnings of Psych.safe_load args in Ruby 2.6 #6396

Merged
merged 1 commit into from Oct 20, 2018

Conversation

koic
Copy link
Member

@koic koic commented Oct 20, 2018

Follow up of #6395 (comment).

The interface of Psych.safe_load will change from Ruby 2.6.
ruby/ruby@1c92766

This PR suppresses the following wargnins.

cd /path/to/rubocop/repo
% ruby -v
ruby 2.6.0dev (2018-10-21 trunk 65252) [x86_64-darwin17]
bundle exec rspec

(snip)

warning: Passing whitelist_classes with the 2nd argument of Psych.safe_load is deprecated. Use keyword argument like Psych.safe_load(yaml, whitelist_classes: ...) instead.
warning: Passing whitelist_symbols with the 3rd argument of Psych.safe_load is deprecated. Use keyword argument like Psych.safe_load(yaml, whitelist_symbols: ...) instead.
warning: Passing aliases with the 4th argument of Psych.safe_load is deprecated. Use keyword argument like Psych.safe_load(yaml, aliases: ...) instead.
warning: Passing filename with the 5th argument of Psych.safe_load is deprecated. Use keyword argument like Psych.safe_load(yaml, filename: ...) instead.

Before submitting the PR make sure the following are checked:

  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences.
  • Run rake default. It executes all tests and RuboCop for itself, and generates the documentation.

Follow up of rubocop#6395 (comment).

The interface of `Psych.safe_load` will change from Ruby 2.6.
ruby/ruby@1c92766

This PR suppresses the following wargnins.

```console
cd /path/to/rubocop/repo
% ruby -v
ruby 2.6.0dev (2018-10-21 trunk 65252) [x86_64-darwin17]
bundle exec rspec

(snip)

warning: Passing whitelist_classes with the 2nd argument of
Psych.safe_load is deprecated. Use keyword argument like
Psych.safe_load(yaml, whitelist_classes: ...) instead.
warning: Passing whitelist_symbols with the 3rd argument of
Psych.safe_load is deprecated. Use keyword argument like
Psych.safe_load(yaml, whitelist_symbols: ...) instead.
warning: Passing aliases with the 4th argument of
Psych.safe_load is deprecated. Use keyword argument like
Psych.safe_load(yaml, aliases: ...) instead.
warning: Passing filename with the 5th argument of
Psych.safe_load is deprecated. Use keyword argument like
Psych.safe_load(yaml, filename: ...) instead.
```
@bbatsov bbatsov merged commit 741cd6c into rubocop:master Oct 20, 2018
@bbatsov
Copy link
Collaborator

bbatsov commented Oct 20, 2018

👍

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