ruby-changes:12997
From: nobu <ko1@a...>
Date: Thu, 3 Sep 2009 17:58:57 +0900 (JST)
Subject: [ruby-changes:12997] Ruby:r24741 (trunk): * parse.y (literal_concat_gen): concat body from dstr instead of
nobu 2009-09-03 17:57:28 +0900 (Thu, 03 Sep 2009) New Revision: 24741 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24741 Log: * parse.y (literal_concat_gen): concat body from dstr instead of nd_next. [ruby-core:25284] Modified files: trunk/ChangeLog trunk/bootstraptest/test_literal.rb trunk/parse.y Index: ChangeLog =================================================================== --- ChangeLog (revision 24740) +++ ChangeLog (revision 24741) @@ -1,3 +1,8 @@ +Thu Sep 3 17:56:40 2009 Nobuyoshi Nakada <nobu@r...> + + * parse.y (literal_concat_gen): concat body from dstr instead of + nd_next. [ruby-core:25284] + Wed Sep 2 16:49:53 2009 Nobuyoshi Nakada <nobu@r...> * math.c (math_gamma): get rid of direct comparison between too Index: bootstraptest/test_literal.rb =================================================================== --- bootstraptest/test_literal.rb (revision 24740) +++ bootstraptest/test_literal.rb (revision 24741) @@ -192,3 +192,11 @@ rescue end }, '[ruby-dev:34536]' + +assert_equal 'ok', %q{ + "#{}""#{}ok" +}, '[ruby-dev:38968]' + +assert_equal 'ok', %q{ + "#{}o""#{}k""#{}" +}, '[ruby-core:25284]' Index: parse.y =================================================================== --- parse.y (revision 24740) +++ parse.y (revision 24741) @@ -7844,7 +7844,9 @@ head = tail; } else if (NIL_P(tail->nd_lit)) { - list_concat(head, tail->nd_next); + head->nd_alen += tail->nd_alen - 1; + head->nd_next->nd_end->nd_next = tail->nd_next; + head->nd_next->nd_end = tail->nd_next->nd_end; rb_gc_force_recycle((VALUE)tail); } else { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/