diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-03 08:57:28 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-03 08:57:28 +0000 |
| commit | 4f7dfa750666e90bc27d977bfb19d427bd2931c6 (patch) | |
| tree | 053f6712fa467d30c46fa43dd69a24a881f4bbb1 | |
| parent | f28cc9453a91d253bb0612270f6c9a28485e6d53 (diff) | |
| download | ruby-4f7dfa750666e90bc27d977bfb19d427bd2931c6.tar.gz ruby-4f7dfa750666e90bc27d977bfb19d427bd2931c6.tar.xz ruby-4f7dfa750666e90bc27d977bfb19d427bd2931c6.zip | |
* parse.y (literal_concat_gen): concat body from dstr instead of
nd_next. [ruby-core:25284]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | bootstraptest/test_literal.rb | 8 | ||||
| -rw-r--r-- | parse.y | 4 |
3 files changed, 16 insertions, 1 deletions
@@ -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 8480c6530..ab028e2c1 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]' @@ -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 { |
