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 | a97190548f3602e52d50cba3a97a9c926d4d8789 (patch) | |
tree | b31e8740a6bac58ec5c396792b2fa2c6bd7b800f /parse.y | |
parent | ff17ee0d310751f5f5c90226c36caffe484843fd (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: svn+ssh://ci.ruby-lang.org/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); |