disabled interpolations in normal regexes

This commit is contained in:
satyr
2010-10-04 21:50:50 +09:00
parent 493fa7d8fe
commit cdd033ffb0
10 changed files with 194 additions and 243 deletions

View File

@@ -12,7 +12,7 @@ g = 1
ok y / x/g is 2
ok 'http://google.com'.match(/:\/\/goog/)
ok /:\/[/]goog/.test 'http://google.com'
obj = {
width: -> 10
@@ -20,11 +20,6 @@ obj = {
}
id = 2
ok ' '.match(/ /)[0] is ' '
regexp = / /
ok ' '.match regexp
ok (obj.width()/id - obj.height()/id) is -5
eq /^I'm\s+Heregex?\/\/\//gim + '', ///
@@ -32,8 +27,9 @@ eq /^I'm\s+Heregex?\/\/\//gim + '', ///
///gim + ''
eq '\\\\#{}', ///
#{
"#{ '\\' }"
"#{ '\\' }" # normal comment
}
# regex comment
\#{}
///.source
eq /// /// + '', '/(?:)/'