Closed r7kamura closed 2 months ago
Openend an issue for the prism difference https://github.com/ruby/prism/issues/2957
Fixed in parser
: https://github.com/whitequark/parser/pull/1033
It may still make sense to do this but would hide issues with parser
which I think would be bad.
Thanks @r7kamura and @Earlopain
So now that this is fixed in parser
, we should be good without rescuing exceptions here, right? I agree we should avoid doing it if we can.
OK, I have confirmed on my end that the latest parser has successfully solved the problem. I'm going to close this issue now that rubocop-ast doesn't have to deal with it.
Thanks a lot!
I noticed that if I give
ProcessedSource
code that contains an invalid encoding regular expression (e.g./あ/n
), it does not catch this encoding error.This exception is raised from
#tokenize
, so why not catch the exception raised here as well?