Permalink
Browse files

Fix sys.inspect for regex in different context.

  • Loading branch information...
1 parent 9253333 commit 5dc2b9331149436b9331deb890bbd2deb6dfe0e5 Herbert Vojčík committed with ry Aug 17, 2010
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/sys.js
View
@@ -224,8 +224,7 @@ function isRegExp (re) {
&& re.compile
&& re.test
&& re.exec
- && s.charAt(0) === "/"
- && s.substr(-1) === "/";
+ && s.match(/^\/.*\/[gim]{0,3}$/);
}

0 comments on commit 5dc2b93

Please sign in to comment.