Categories
Computers

WTF: assertFalse(/foo/.test(null)) fails?

$ js
Rhino 1.7 release 1 2008 03 06
js> var foo = new RegExp("([a-zA-Z/])+");
/([a-zA-Z/])+/
js> foo.test(null)
true

What? Passing null to a regexp passes?

Advertisements