Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

Add direct send mutation (a.send(:foo) -> a.foo) #69

Open
dgollahon opened this issue Mar 19, 2017 · 0 comments
Open

Add direct send mutation (a.send(:foo) -> a.foo) #69

dgollahon opened this issue Mar 19, 2017 · 0 comments

Comments

@dgollahon
Copy link
Owner

Replace a.__send__(method), a.send(method), and a.public_send(method) with a.method where method is a string or a symbol. I think we could actually statically replace a.public_send(:b) with a.b (might be an interesting rubocop cop), but we might be able to replace a __send__ or send in some scopes with a regular method call and not be able to in some others. In general it just doesn't make sense to call send with a literal.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant