This is lifted from Parser's codebase, but shouldn't be necessary once [this commit](https://github.com/whitequark/parser/commit/39f7f3236762d5195b9e155e32a3dc6ca9cc5e1e) is released in a gem