mutest icon indicating copy to clipboard operation
mutest copied to clipboard

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

Open dgollahon opened this issue 9 years ago • 0 comments

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.

dgollahon avatar Mar 19 '17 20:03 dgollahon