summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorKouki Ooyatsu <[email protected]>2013-02-28 10:56:58 +0900
committerKouki Ooyatsu <[email protected]>2013-02-28 11:16:15 +0900
commit1ea13483cb3a5d6e0007b49b0ab9cfdb3e9055eb (patch)
tree3702c8325da78f5c39228272a8ea567c18b63524 /src
parentfbe041768bf133268b63344957acb05962df41c7 (diff)
downloadmruby-1ea13483cb3a5d6e0007b49b0ab9cfdb3e9055eb.tar.gz
mruby-1ea13483cb3a5d6e0007b49b0ab9cfdb3e9055eb.zip
Regexp: %r notation bug fix. close #85.
be able to parse any delimiters. variable expansion isn't supported yet. * sample code ``` def matchpath(str) puts "#{str} is ..." if %r!img/! =~ str then puts "match" else puts "not match" end end matchpath("img/a.png") # => match matchpath("/usr/local/bin") # => not match matchpath("book/img/local") # => match ```
Diffstat (limited to 'src')
-rw-r--r--src/parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse.y b/src/parse.y
index 365bc5f18..2c5690ea3 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -4440,7 +4440,7 @@ parser_yylex(parser_state *p)
p->lex_strterm = new_strterm(p, str_regexp, term, paren);
#endif
p->regexp = 1;
- p->sterm = '/';
+ p->sterm = term;
return tREGEXP_BEG;
case 's':