-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Change kwarg names of Psych in Ruby 2.6 #6470
Merged
bbatsov
merged 1 commit into
rubocop:master
from
koic:change_psych_kwarg_names_for_ruby_2_6
Nov 12, 2018
Merged
Change kwarg names of Psych in Ruby 2.6 #6470
bbatsov
merged 1 commit into
rubocop:master
from
koic:change_psych_kwarg_names_for_ruby_2_6
Nov 12, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR fixes the follwoing error. ```console % ruby -v ruby 2.6.0dev (2018-11-11 trunk 65667) [x86_64-darwin17] % bundle exec rake Files: 514 Modules: 80 ( 11 undocumented) Classes: 485 ( 3 undocumented) Constants: 751 ( 738 undocumented) Attributes: 26 ( 0 undocumented) Methods: 1163 ( 1037 undocumented) 28.58% documented rake aborted! ArgumentError: unknown keywords: whitelist_classes, whitelist_symbols /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/config_loader.rb:189:in `yaml_safe_load' /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/config_loader.rb:162:in `load_yaml_configuration' /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/config_loader.rb:41:in `load_file' /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/config_loader.rb:107:in `default_configuration' tasks/cops_documentation.rake:247:in `main' tasks/cops_documentation.rake:262:in `block in <top (required)>' /Users/koic/.rbenv/versions/2.6.0-dev/bin/bundle:30:in `block in <main>' /Users/koic/.rbenv/versions/2.6.0-dev/bin/bundle:22:in `<main>' Tasks: TOP => default => generate_cops_documentation (See full trace by running task with --trace) ``` These kwarg names has been changed by the following links. - ruby/psych#378 - ruby/ruby@6268098 For these kwarg names change, This PR will not add the new conditional branch using `Gem::Version.new(Psych::VERSION)`. It is the same as for the following reasons. > Because the kwargs API was not included in the latest stable psych gemrelease, 3.0.3: https://github.com/ruby/psych/blob/v3.0.3/lib/psych.rb#L318 > It's only been a part of beta releases of the next minor. > No real user will be affected by the API change. ruby/psych#378 (comment)
Drenmi
approved these changes
Nov 12, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
8 tasks
JuanitoFatas
approved these changes
Nov 12, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
👍 |
This was referenced Nov 20, 2018
8 tasks
koic
added a commit
to koic/rubocop
that referenced
this pull request
Jun 17, 2019
This PR suppresses the following `Psych.parse` args warn when using Psych 3.1.0 (Ruby 2.6+). ```console % ruby -v ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin17] % RUBYOPT=-w bundle exec rubocop (snip) /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-0.71.0/lib/ rubocop/yaml_duplication_checker.rb:8: Passing filename with the 2nd argument of Psych.parse is deprecated. Use keyword argument like Psych.parse(yaml, filename: ...) instead. ``` The above `Psych.parse` interface has been changed by the following link. ruby/psych@4d4439d Related PR ... rubocop#6470
bbatsov
pushed a commit
that referenced
this pull request
Jun 18, 2019
This PR suppresses the following `Psych.parse` args warn when using Psych 3.1.0 (Ruby 2.6+). ```console % ruby -v ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin17] % RUBYOPT=-w bundle exec rubocop (snip) /Users/koic/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/rubocop-0.71.0/lib/ rubocop/yaml_duplication_checker.rb:8: Passing filename with the 2nd argument of Psych.parse is deprecated. Use keyword argument like Psych.parse(yaml, filename: ...) instead. ``` The above `Psych.parse` interface has been changed by the following link. ruby/psych@4d4439d Related PR ... #6470
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the follwoing error.
These kwarg names has been changed by the following links.
For these kwarg names change, This PR will not add the new conditional branch
using
Gem::Version.new(Psych::VERSION)
. It is the same as for the following reasons.ruby/psych#378 (comment)
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).and description in grammatically correct, complete sentences.
bundle exec rake default
. It executes all tests and RuboCop for itself, and generates the documentation.