allowing more flexible whitespace-started regexes. You have to wrap 'em in parens or assign to 'em, but it's better than nothing.

This commit is contained in:
Jeremy Ashkenas
2010-08-12 20:24:53 -04:00
parent 083500fc0e
commit 1eebbfe2bc
3 changed files with 14 additions and 5 deletions

View File

@@ -20,4 +20,9 @@ obj = {
}
id = 2
ok ' '.match(/ /)[0] is ' '
regexp = / /
ok ' '.match regexp
ok (obj.width()/id - obj.height()/id) is -5