ruby-changes:12726
From: yugui <ko1@a...>
Date: Sun, 9 Aug 2009 14:59:53 +0900 (JST)
Subject: [ruby-changes:12726] Ruby:r24453 (ruby_1_9_1): merges r24332 and r24333 from trunk into ruby_1_9_1.
yugui 2009-08-09 00:28:03 +0900 (Sun, 09 Aug 2009) New Revision: 24453 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24453 Log: 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] Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/bootstraptest/test_syntax.rb branches/ruby_1_9_1/parse.y branches/ruby_1_9_1/version.h Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 24452) +++ ruby_1_9_1/ChangeLog (revision 24453) @@ -1,3 +1,15 @@ +Fri Jul 31 10:54:08 2009 Nobuyoshi Nakada <nobu@r...> + + * parse.y (literal_concat_gen): reduced unnecessary node at string + literal concatenation with empty head dstr. [ruby-dev:38968] + +Fri Jul 31 02:57:39 2009 Yusuke Endoh <mame@t...> + + * 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. + Thu Jul 30 23:04:32 2009 Yuki Sonoda (Yugui) <yugui@y...> * gem_prelude.rb (Gem.path): uses Gem.default_path as a default value Index: ruby_1_9_1/bootstraptest/test_syntax.rb =================================================================== --- ruby_1_9_1/bootstraptest/test_syntax.rb (revision 24452) +++ ruby_1_9_1/bootstraptest/test_syntax.rb (revision 24453) @@ -828,3 +828,6 @@ p a.compact! } +assert_equal 'ok', %q{ + "#{}""#{}ok" +}, '[ruby-dev:38968]' Index: ruby_1_9_1/parse.y =================================================================== --- ruby_1_9_1/parse.y (revision 24452) +++ ruby_1_9_1/parse.y (revision 24453) @@ -7880,6 +7880,10 @@ 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); Index: ruby_1_9_1/version.h =================================================================== --- ruby_1_9_1/version.h (revision 24452) +++ ruby_1_9_1/version.h (revision 24453) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.1" -#define RUBY_PATCHLEVEL 258 +#define RUBY_PATCHLEVEL 259 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/