ramda/ramda

When you pass a string to R.test instead of a regex, it always returns true

albrow opened this issue · 2 comments

The following code returns true:

R.test('foo', 'bar')

Here it is in the repl.

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.

Are you happy for us to check the type of the first argument, @CrossEye?

Not really, but I can't think of anything better.