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

Add ToJSON Linter #6379

Merged
merged 2 commits into from
Mar 10, 2019
Merged

Add ToJSON Linter #6379

merged 2 commits into from
Mar 10, 2019

Commits on Dec 14, 2018

  1. [Fix rubocop#6378] Add ToJSON Linter

    This fixes issue rubocop#6378
    
    classes that override to_json need to ensure an optional argument is
    available.
    
    class MyClass
      def to_json
      end
    end
    
    While calling MyClass.new.to_json works, calling
    JSON.generate(MyClass.new) results in an ArgumentError.
    Anthony Ross committed Dec 14, 2018
    Configuration menu
    Copy the full SHA
    8fd679e View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2019

  1. Configuration menu
    Copy the full SHA
    97b205b View commit details
    Browse the repository at this point in the history