ruby-changes:12643
From: nobu <ko1@a...>
Date: Sun, 2 Aug 2009 21:05:01 +0900 (JST)
Subject: [ruby-changes:12643] Ruby:r24356 (trunk): * parse.y (literal_concat0): tail can be nil.
nobu 2009-08-02 21:04:43 +0900 (Sun, 02 Aug 2009) New Revision: 24356 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24356 Log: * parse.y (literal_concat0): tail can be nil. [ruby-dev:38980] Modified files: trunk/ChangeLog trunk/bootstraptest/test_syntax.rb trunk/parse.y Index: ChangeLog =================================================================== --- ChangeLog (revision 24355) +++ ChangeLog (revision 24356) @@ -1,3 +1,7 @@ +Sun Aug 2 21:04:37 2009 Nobuyoshi Nakada <nobu@r...> + + * parse.y (literal_concat0): tail can be nil. [ruby-dev:38980] + Sun Aug 2 20:09:07 2009 Nobuyoshi Nakada <nobu@r...> * array.c (rb_ary_combination, rb_ary_product): prevent from GC. Index: bootstraptest/test_syntax.rb =================================================================== --- bootstraptest/test_syntax.rb (revision 24355) +++ bootstraptest/test_syntax.rb (revision 24356) @@ -831,3 +831,8 @@ assert_equal 'ok', %q{ "#{}""#{}ok" }, '[ruby-dev:38968]' + + +assert_equal 'ok', %q{ + "o" "#{}k" +}, '[ruby-dev:38980]' Index: parse.y =================================================================== --- parse.y (revision 24355) +++ parse.y (revision 24356) @@ -7782,6 +7782,7 @@ static int literal_concat0(struct parser_params *parser, VALUE head, VALUE tail) { + if (NIL_P(tail)) return 1; if (!rb_enc_compatible(head, tail)) { compile_error(PARSER_ARG "string literal encodings differ (%s / %s)", rb_enc_name(rb_enc_get(head)), -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/