diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-08 15:28:03 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-08 15:28:03 +0000 |
| commit | ad81b56e35f314dfe6ff1091d29c7e4a0e4ba497 (patch) | |
| tree | b31e8740a6bac58ec5c396792b2fa2c6bd7b800f /parse.y | |
| parent | 1202da0776d67b5e861ea44f232cc8c01070c24e (diff) | |
merges r24332 and r24333 from trunk into ruby_1_9_1.
--
* 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.
--
* parse.y (literal_concat_gen): reduced unnecessary node at string
literal concatenation with empty head dstr. [ruby-dev:38968]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@24453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -7880,6 +7880,10 @@ literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) rb_gc_force_recycle((VALUE)head); head = tail; } + else if (NIL_P(tail->nd_lit)) { + list_concat(head, tail->nd_next); + rb_gc_force_recycle((VALUE)tail); + } else { nd_set_type(tail, NODE_ARRAY); tail->nd_head = NEW_STR(tail->nd_lit); |
