diff options
-rw-r--r-- | parse.y | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -5577,6 +5577,7 @@ rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start) #define STR_FUNC_SYMBOL 0x10 #define STR_FUNC_INDENT 0x20 #define STR_FUNC_LABEL 0x40 +#define STR_TERM_END -1 enum string_type { str_label = STR_FUNC_LABEL, @@ -6349,7 +6350,7 @@ parser_parse_string(struct parser_params *parser, NODE *quote) int c, space = 0; rb_encoding *enc = current_enc; - if (func == -1) return tSTRING_END; + if (term == STR_TERM_END) return tSTRING_END; c = nextc(); if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) { do {c = nextc();} while (ISSPACE(c)); @@ -6357,7 +6358,7 @@ parser_parse_string(struct parser_params *parser, NODE *quote) } if (c == term && !quote->nd_nest) { if (func & STR_FUNC_QWORDS) { - quote->nd_func = -1; + quote->u2.id = STR_TERM_END; return ' '; } return parser_string_term(parser, func); @@ -6794,7 +6795,7 @@ parser_here_document(struct parser_params *parser, NODE *here) yylval.val, str); #endif heredoc_restore(lex_strterm); - lex_strterm = NEW_STRTERM(-1, 0, 0); + lex_strterm = NEW_STRTERM(func, STR_TERM_END, 0); set_yylval_str(str); return tSTRING_CONTENT; } |