From 5f2817b36c32ff71031c514b2fdf51ba6b74d83c Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 4 Apr 2014 13:12:58 +0900 Subject: backslash escapes in regexp should be addressed by Regexp processor; close #2005 --- src/parse.y | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/parse.y b/src/parse.y index 2cf1571d3..ec27a2c51 100644 --- a/src/parse.y +++ b/src/parse.y @@ -3829,6 +3829,10 @@ parse_string(parser_state *p) tokadd(p, '\n'); } } + else if (type & STR_FUNC_REGEXP) { + tokadd(p, '\\'); + tokadd(p, c); + } else { pushback(p, c); tokadd(p, read_escape(p)); -- cgit v1.2.3