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

Handle major version requirements in Gemspec/RequiredRubyVersion #8310

Merged
merged 1 commit into from Jul 12, 2020

Commits on Jul 11, 2020

  1. Handle major version requirements in Gemspec/RequiredRubyVersion

    It's possible to use `required_ruby_version` to allow all minor versions
    of a particular major version of Ruby:
    
        spec.required_ruby_version = '~> 2'
    
    Previously this would cause `Gemspec/RequiredRubyVersion` to crash with:
    
        undefined method `[]' for nil:NilClass
        lib/rubocop/cop/gemspec/required_ruby_version.rb:71:in `extract_ruby_version'
    
    I've added docs and tests for the pessimistic operator, which otherwise
    works well.
    eugeneius committed Jul 11, 2020
    Copy the full SHA
    6fc2461 View commit details
    Browse the repository at this point in the history