Note that this is much better than find and replace. We are rewriting the method signature and corresponding local variable usage!
-
-
-
This is a full script too, not an isolated example. It globs over everything in the `lib` directory and writes the new source to the file.
-
Took ~20min to write a separate script earlier to detect and rewrite code unnecessarily spread over multiple lines.
-
I'm rewriting with
@whitequark's parser. I use RuboCop for 2 helper methods here but the powerful lightweight static rewrite is all Parser.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.