dgollahon / rspectre

Exorcise the apparitions haunting your tests.
MIT License
75 stars 10 forks source link

Suport non-utf8 strings #26

Closed dgollahon closed 4 years ago

dgollahon commented 4 years ago

Binary literals of the form of let(:a) { "\xabcd".b } frequently occur in tests but are not supported by parser out of the box because parser assumes that the person processing the nodes will want to be able to assume all strings it produces will be valid utf-8 strings. This is reasonable for some use-cases, but we don't actually need to make any assumptions or do any kind of processing. This small modification allows us to pass binary strings through unharmed and to flag items in more files.

Additionally, this greatly reduces warning/error noise.

Closes #17