banister / method_source

return the sourcecode for a method
MIT License
361 stars 43 forks source link

EncodingError is raised when checking code strings containing symbol literals with invalid UTF-8 chars for completeness #36

Open egwspiti opened 8 years ago

egwspiti commented 8 years ago
> 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.

kyrylo commented 8 years ago

I don't think it's possible to fix this easily given the mechanism this (and even my (fast_method_source)) library works.

egwspiti commented 8 years ago

Then I guess pry/pry#1516 should be reopened.