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 a rule about send metaprogramming. #461

Merged
merged 1 commit into from
Oct 9, 2015
Merged

Conversation

syndbg
Copy link
Contributor

@syndbg syndbg commented Jul 29, 2015

Submitted as requested in rubocop/rubocop#2081

@@ -3616,6 +3616,9 @@ resource cleanup when possible.
* <a name="prefer-public-send"></a>
Prefer `public_send` over `send` so as not to circumvent `private`/`protected` visibility.
<sup>[[link](#prefer-public-send)]</sup>
* <a name="prefer-__send__"></a>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a blank line before the anchor.

@bbatsov
Copy link
Collaborator

bbatsov commented Jul 29, 2015

And I guess you'll submit one more PR about public_send, right? :-)

@syndbg
Copy link
Contributor Author

syndbg commented Jul 29, 2015

@bbatsov Isn't the existing rule about public_send sufficient? I should add code examples for both public_send and __send__ rules, though.

I have to think about good (and meaningful) code examples that prove the rules.

@bbatsov
Copy link
Collaborator

bbatsov commented Jul 30, 2015

Sorry about this. Was a bit distracted when I made my comment. Just remove the . from the commit message's title.

@bbatsov
Copy link
Collaborator

bbatsov commented Aug 4, 2015

@syndbg ping :-)

@syndbg
Copy link
Contributor Author

syndbg commented Aug 9, 2015

@bbatsov Sorry for the delays. Added code examples.

Turned out that thinking of good examples for trivial stuff is hard. 🎱

@syndbg
Copy link
Contributor Author

syndbg commented Oct 9, 2015

@bbatsov ping.

bbatsov added a commit that referenced this pull request Oct 9, 2015
Add a rule about `send` metaprogramming
@bbatsov bbatsov merged commit fd1c943 into rubocop:master Oct 9, 2015
@bbatsov
Copy link
Collaborator

bbatsov commented Oct 9, 2015

👍

shyouhei pushed a commit to shyouhei/ruby-style-guide that referenced this pull request Nov 11, 2015
Add a rule about `send` metaprogramming
@syndbg syndbg deleted the patch-1 branch January 1, 2016 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants