summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-29 08:40:40 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-29 08:40:40 +0000
commitd3fb88d09aea446e670eeab9864b333b22332451 (patch)
tree3e2fc873e8d25271f1a7e6f3f23635db112b55b3 /parse.y
parent4a4a83c981b1f51f625073fbd63f8dc8a9f53044 (diff)
merge revision(s) 51820: [Backport #11519]
* 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/branches/ruby_2_1@51978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 80a45ebf63..8f8bed499b 100644
--- a/parse.y
+++ b/parse.y
@@ -8477,7 +8477,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;
}
@@ -8550,7 +8550,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;
}