From 3129ed327ed8a365652fedf1d311e0af6137491c Mon Sep 17 00:00:00 2001 From: mame Date: Thu, 30 Jul 2009 18:02:37 +0000 Subject: [PATCH] * parse.y (literal_concat_gen): NODE_DSTR was incorrectly handled as NODE_STR. [ruby-dev:38968] * bootstraptest/test_syntax.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ bootstraptest/test_syntax.rb | 3 +++ parse.y | 4 +--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index be67d6e859..4d052c9f65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Jul 31 02:57:39 2009 Yusuke Endoh + + * parse.y (literal_concat_gen): NODE_DSTR was incorrectly handled as + NODE_STR. [ruby-dev:38968] + + * bootstraptest/test_syntax.rb: add a test for above. + Fri Jul 31 00:55:48 2009 Yusuke Endoh * test/ruby/test_module.rb (test_ancestors, test_included_modules): diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb index a9005a4292..131625ea6b 100644 --- a/bootstraptest/test_syntax.rb +++ b/bootstraptest/test_syntax.rb @@ -828,3 +828,6 @@ assert_normal_exit %q{ p a.compact! } +assert_equal 'ok', %q{ + "#{}""#{}ok" +}, '[ruby-dev:38968]' diff --git a/parse.y b/parse.y index fbbad25fb8..e6c921e57a 100644 --- a/parse.y +++ b/parse.y @@ -7833,9 +7833,7 @@ literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) head = tail; } else { - nd_set_type(tail, NODE_ARRAY); - tail->nd_head = NEW_STR(tail->nd_lit); - list_concat(head, tail); + list_concat(head, NEW_ARRAY(tail)); } break;