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 #258

Merged
merged 1 commit into from
Oct 25, 2018

Conversation

koic
Copy link
Contributor

@koic koic commented Oct 25, 2018

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

This PR suppresses the following wargnins in Ruby 2.6.0-dev.

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.
% ruby -v
ruby 2.6.0dev (2018-10-21 trunk 65252) [x86_64-darwin17]

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

This PR suppresses the following wargnins in Ruby 2.6.0-dev.

```console
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.
```

```console
% ruby -v
ruby 2.6.0dev (2018-10-21 trunk 65252) [x86_64-darwin17]
```
@winebarrel
Copy link
Collaborator

Thank you!

@winebarrel winebarrel merged commit fb8a211 into ridgepole:0.7 Oct 25, 2018
@koic koic deleted the suppress_psych_safe_load_warnings branch October 25, 2018 12:37
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