diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-14 15:37:48 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-14 15:37:48 +0000 |
commit | 50702d16ab5862413351520b65da820194dbf8d7 (patch) | |
tree | 3dfc239d5db8aebdda3751367d26b1fc3df7d6d7 /parse.y | |
parent | 19ae98d5ce12cd29d5bd276afbfd0a365265121f (diff) | |
download | ruby-50702d16ab5862413351520b65da820194dbf8d7.tar.gz |
parse.y: zero codepoints
* parse.y (parser_tokadd_utf8): relax restriction to allow zero or
more codepoints. fixup r59417.
https://github.com/ruby/ruby/commit/7e8b910#commitcomment-25602670
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -5999,7 +5999,7 @@ parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, int c, last = nextc(); if (lex_p >= lex_pend) goto unterminated; while (ISSPACE(c = *lex_p) && ++lex_p < lex_pend); - do { + while (c != close_brace) { if (regexp_literal) tokadd(last); if (!parser_tokadd_codepoint(parser, encp, regexp_literal, TRUE)) { break; @@ -6008,7 +6008,7 @@ parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp, if (++lex_p >= lex_pend) goto unterminated; last = c; } - } while (c != close_brace); + } if (c != close_brace) { unterminated: |