When you pass a string to R.test instead of a regex, it always returns true
albrow opened this issue · comments
Alex Browne commented
The following code returns true:
R.test('foo', 'bar')
This seems like a pretty easy mistake to make, and I think the appropriate behavior is to throw an exception and point out that the first argument is not the correct type.
David Chambers commented
Are you happy for us to check the type of the first argument, @CrossEye?
Scott Sauyet commented
Not really, but I can't think of anything better.