Skip to content

Conversation

@cheshire137
Copy link
Member

@cheshire137 cheshire137 commented Jan 3, 2024

This adds a new cop to detect when use of Object#send, #public_send, or __send__. At first I had the Rubocop flagging every use of a send method, but I scaled that back so the cop is less strict. If the method name being sent is constant, like foo.send(:bar), the cop doesn't complain. The cop also allows for partially dynamic method names, as long as some of the method being sent is constant.

Related:

@cheshire137 cheshire137 self-assigned this Jan 3, 2024
@cheshire137 cheshire137 requested a review from a team as a code owner January 3, 2024 19:40
@cheshire137 cheshire137 merged commit 5431a42 into main Jan 5, 2024
@cheshire137 cheshire137 deleted the cop-no-dyn-obj-send branch January 5, 2024 20:05
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.

3 participants