I encountered an issue where RuboCop fails to run on my environment using Ruby 3.1.5. The error appears to be caused by the current version of RuboCop (0.53.0), which is incompatible with Ruby 3.1 due to changes in Psych.safe_load.
Steps to Reproduce
- Clone the repository.
- Run bundle install on Ruby 3.1.5.
- Execute bundle exec rake.
Observed Behavior
The following error occurs during the RuboCop task:
wrong number of arguments (given 5, expected 1)
/path/to/psych.rb:322:in `safe_load'
...
RuboCop failed!
Proposed Solutions
- Would it be acceptable to update the RuboCop version to ensure compatibility with newer Ruby versions?
- Alternatively, should we specify a compatible Ruby version for development in the project documentation or configuration files?
Environment
- Ruby version: 3.1.5 (tested on my local environment)
- RuboCop version: 0.53.0 (as specified in the Gemfile)
Thank you for your time and consideration. I am happy to submit a Pull Request based on the preferred solution.