rspec - Invalid character '\240' in expression
We have been using rspec on my project for the unit testing of our Ruby code and while running one of the specs last week I ended up getting this somewhat en-cryptic error message:
Invalid character '\240' in expression
...
After convincing myself that this error wasn’t actually possible it turned out that I had somehow entered an 'invisible to TextMate' character after one of the method definitions - on the editor it just looked like a space.
I’m not sure exactly what the character was but deleting it got rid of the error and got my test/spec running again.
About the author
I'm currently working on short form content at ClickHouse. I publish short 5 minute videos showing how to solve data problems on YouTube @LearnDataWithMark. I previously worked on graph analytics at Neo4j, where I also co-authored the O'Reilly Graph Algorithms Book with Amy Hodler.