ruby-changes:17567
From: yugui <ko1@a...>
Date: Sat, 23 Oct 2010 22:13:11 +0900 (JST)
Subject: [ruby-changes:17567] Ruby:r29572 (ruby_1_9_2): merges r29410 from trunk into ruby_1_9_2.
yugui 2010-10-23 22:02:52 +0900 (Sat, 23 Oct 2010) New Revision: 29572 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29572 Log: merges r29410 from trunk into ruby_1_9_2. -- * parse.y (regexp): dregexp has literal string only at the head and successors are array. [ruby-core:32682] Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/parse.y branches/ruby_1_9_2/test/ruby/test_literal.rb branches/ruby_1_9_2/version.h Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 29571) +++ ruby_1_9_2/ChangeLog (revision 29572) @@ -1,3 +1,8 @@ +Mon Oct 4 12:43:47 2010 Nobuyoshi Nakada <nobu@r...> + + * parse.y (regexp): dregexp has literal string only at the head + and successors are array. [ruby-core:32682] + Tue Aug 10 11:26:33 2010 NAKAMURA Usaku <usa@r...> * lib/un.rb (httpd): SIGQUIT and SIGHUP are not guaranteed to exist. Index: ruby_1_9_2/parse.y =================================================================== --- ruby_1_9_2/parse.y (revision 29571) +++ ruby_1_9_2/parse.y (revision 29572) @@ -3890,7 +3890,8 @@ if (nd_type(list->nd_head) == NODE_STR) { VALUE tail = list->nd_head->nd_lit; if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) { - if (!literal_concat0(parser, prev->nd_lit, tail)) { + VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit; + if (!literal_concat0(parser, lit, tail)) { node = 0; break; } Index: ruby_1_9_2/version.h =================================================================== --- ruby_1_9_2/version.h (revision 29571) +++ ruby_1_9_2/version.h (revision 29572) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 25 +#define RUBY_PATCHLEVEL 26 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 Index: ruby_1_9_2/test/ruby/test_literal.rb =================================================================== --- ruby_1_9_2/test/ruby/test_literal.rb (revision 29571) +++ ruby_1_9_2/test/ruby/test_literal.rb (revision 29572) @@ -107,6 +107,8 @@ def test_dregexp assert_instance_of Regexp, /re#{'ge'}xp/ assert_equal(/regexp/, /re#{'ge'}xp/) + bug3903 = '[ruby-core:32682]' + assert_raise(SyntaxError, bug3903) {eval('/[#{"\x80"}]/')} end def test_array -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/