diff options
author | Jemma Issroff <[email protected]> | 2023-06-30 14:30:24 -0400 |
---|---|---|
committer | Jemma Issroff <[email protected]> | 2023-07-05 16:58:55 -0400 |
commit | bfb933371d80f5a4ba23f2e978050e33c74de80e (patch) | |
tree | 406227a26e0a47c7c192e5e456610fdde422a498 /yarp/regexp.c | |
parent | 6f9d1b4b0f8938c42aa767577c7c6761ed9de64a (diff) |
Manual YARP resync
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/8007
Diffstat (limited to 'yarp/regexp.c')
-rw-r--r-- | yarp/regexp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yarp/regexp.c b/yarp/regexp.c index 1d4d1ac1af..c8aeaa0adb 100644 --- a/yarp/regexp.c +++ b/yarp/regexp.c @@ -374,7 +374,7 @@ yp_regexp_parse_group(yp_regexp_parser_t *parser) { case '#': { // inline comments bool found = yp_regexp_char_find(parser, ')'); // the close paren we found is escaped, we need to find another - while (parser->start <= parser->cursor - 2 && *(parser->cursor - 2) == '\\') { + while (found && (parser->start <= parser->cursor - 2) && (*(parser->cursor - 2) == '\\')) { found = yp_regexp_char_find(parser, ')'); } return found; |