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 compatibility with Ruby 3.1 #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jirutka
Copy link

@jirutka jirutka commented Apr 3, 2022

  • I have added or updated the specs/tests.
  • I have verified that the specs/tests pass on my computer.
  • I have not attempted to bump, or alter versions.
  • This is a documentation change.
  • This is a source change.

Description

Fix compatibility with Ruby 3.1. Note that this PR itself is not sufficient, you need #5 as well.

YAML.safe_load in Ruby 3.1.1 doesn't accept deprecated positional parameters anymore:

  1) Pathutil::Helpers#load_yaml should be able to parse YAML
     Failure/Error:
       YAML.safe_load(
         data,
         whitelist_classes,
         whitelist_symbols,
         aliases
       )

     ArgumentError:
       wrong number of arguments (given 4, expected 1)
     # ./lib/pathutil/helpers.rb:44:in `load_yaml'
     # ./spec/tests/lib/pathutil/helpers_spec.rb:25:in `block (3 levels) in <top (required)>'
SafeYAML has been deprecated a very long time ago.
@jirutka jirutka requested a review from envygeeks as a code owner April 3, 2022 18:38
@olleolleolle
Copy link

olleolleolle commented Apr 12, 2022

(Haha, I refer to #5. Just like you did!)

@jirutka
Copy link
Author

jirutka commented Jul 10, 2022

@envygeeks, can you please merge it and release a new version?

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