method_source
method_source copied to clipboard
EncodingError is raised when checking code strings containing symbol literals with invalid UTF-8 chars for completeness
> MethodSource.complete_expression?('x = :"\xC3"')
=> EncodingError: invalid encoding symbol
Although this code string has invalid utf-8 chars, it is complete, and thus true should be returned.
I don't think it's possible to fix this easily given the mechanism this (and even my (fast_method_source)) library works.
Then I guess pry/pry#1516 should be reopened.