summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
-rw-r--r--re.c9
1 files changed, 8 insertions, 1 deletions
@@ -2948,7 +2948,11 @@ escape_asis:
case '#':
if (extended_mode && !in_char_class) {
/* consume and ignore comment in extended regexp */
- while ((p < end) && ((c = *p++) != '\n'));
break;
}
rb_str_buf_cat(buf, (char *)&c, 1);
@@ -2983,6 +2987,9 @@ escape_asis:
switch (c = *p++) {
default:
if (!(c & 0x80)) break;
--p;
/* fallthrough */
case '\\':