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

Make SendNode#macro? aware of struct constructor #141

Merged

Commits on Oct 23, 2020

  1. Make SendNode#macro? aware of struct constructor

    This PR makes `SendNode#macro?` and `RuboCop::AST::Node#class_constructor?`
    aware of struct constructor and `RuboCop::AST::Node#struct_constructor?`
    is deprecated.
    
    Like class constructor, struct constructor will be recognized as a
    macro and will be awakened in the following `private` modifier:
    
    ```ruby
    Foo = Struct.new(:foo) do
      private
        def private_foo
          foo
        end
    end
    ```
    
    With this change, this PR aims to resolve the following issue.
    rubocop/rubocop#8919
    koic committed Oct 23, 2020
    Configuration menu
    Copy the full SHA
    ca2da26 View commit details
    Browse the repository at this point in the history