summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--bootstraptest/test_literal.rb8
-rw-r--r--parse.y4
3 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 18f248b..f1181fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Sep 3 17:56:40 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* math.c (math_gamma): get rid of direct comparison between too
diff --git a/bootstraptest/test_literal.rb b/bootstraptest/test_literal.rb
index 8480c65..ab028e2 100644
--- a/bootstraptest/test_literal.rb
+++ b/bootstraptest/test_literal.rb
@@ -192,3 +192,11 @@ assert_normal_exit %q{
rescue
end
}, '[ruby-dev:34536]'
+
+assert_equal 'ok', %q{
+ "#{}""#{}ok"
+}, '[ruby-dev:38968]'
+
+assert_equal 'ok', %q{
+ "#{}o""#{}k""#{}"
+}, '[ruby-core:25284]'
diff --git a/parse.y b/parse.y
index f1f5d78..754b363 100644
--- a/parse.y
+++ b/parse.y
@@ -7844,7 +7844,9 @@ literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail)
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 {