From 4ad1cced13e5471dddb17957be0d7ca0df1a153d Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 10 Sep 2015 13:48:51 +0000 Subject: parse.y: keep literal encoding * parse.y (literal_concat_gen, evstr2dstr_gen): keep literal encoding beginning with an interpolation same as the source file encoding. [ruby-core:70703] [Bug #11519] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index b4c8c9ad05..dbcb6544ae 100644 --- a/parse.y +++ b/parse.y @@ -8725,7 +8725,7 @@ literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) htype = nd_type(head); if (htype == NODE_EVSTR) { - NODE *node = NEW_DSTR(Qnil); + NODE *node = NEW_DSTR(STR_NEW0()); head = list_append(node, head); htype = NODE_DSTR; } @@ -8798,7 +8798,7 @@ static NODE * evstr2dstr_gen(struct parser_params *parser, NODE *node) { if (nd_type(node) == NODE_EVSTR) { - node = list_append(NEW_DSTR(Qnil), node); + node = list_append(NEW_DSTR(STR_NEW0()), node); } return node; } -- cgit v1.2.3