Skip to content

RuboCop fails to run on Ruby 3.1.5: Proposal to update RuboCop version or specify compatible Ruby version #95

@nasubibocchi

Description

@nasubibocchi

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

  1. Clone the repository.
  2. Run bundle install on Ruby 3.1.5.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions