ruby-changes:41338
From: naruse <ko1@a...>
Date: Sat, 2 Jan 2016 13:39:53 +0900 (JST)
Subject: [ruby-changes:41338] naruse:r53410 (trunk): Revert r53409 "parse.y: yylval.num should be u3"
naruse 2016-01-02 13:39:56 +0900 (Sat, 02 Jan 2016) New Revision: 53410 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53410 Log: Revert r53409 "parse.y: yylval.num should be u3" It introduces SEGV Modified files: trunk/ChangeLog trunk/parse.y trunk/test/ripper/test_ripper.rb Index: parse.y =================================================================== --- parse.y (revision 53409) +++ parse.y (revision 53410) @@ -5251,7 +5251,7 @@ ripper_yylval_id(ID x) https://github.com/ruby/ruby/blob/trunk/parse.y#L5251 return ripper_new_yylval(x, ID2SYM(x), 0); } # define set_yylval_str(x) (yylval.val = (x)) -# define set_yylval_num(x) (yylval.val = ripper_new_yylval(0, 0, (x))) +# define set_yylval_num(x) (yylval.val = ripper_new_yylval((x), 0, 0)) # define set_yylval_id(x) (void)(x) # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x)) # define set_yylval_literal(x) (void)(x) Index: test/ripper/test_ripper.rb =================================================================== --- test/ripper/test_ripper.rb (revision 53409) +++ test/ripper/test_ripper.rb (revision 53410) @@ -61,15 +61,4 @@ class TestRipper::Ripper < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/test/ripper/test_ripper.rb#L61 assert_predicate @ripper, :yydebug end - def test_regexp_with_option - bug11932 = '[ruby-core:72638] [Bug #11932]' - src = '/[\xC0-\xF0]/u'.force_encoding(Encoding::UTF_8) - ripper = Ripper.new(src) - ripper.parse - assert_predicate(ripper, :error?) - src = '/[\xC0-\xF0]/n'.force_encoding(Encoding::UTF_8) - ripper = Ripper.new(src) - ripper.parse - assert_not_predicate(ripper, :error?, bug11932) - end end if ripper_test Index: ChangeLog =================================================================== --- ChangeLog (revision 53409) +++ ChangeLog (revision 53410) @@ -1,8 +1,3 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 -Sat Jan 2 11:11:01 2016 Nobuyoshi Nakada <nobu@r...> - - * parse.y (set_yylval_num): should be used as nd_state, set to u3. - [ruby-core:72638] [Bug #11932] - Sat Jan 2 02:27:22 2016 Marc-Andre Lafortune <ruby-core@m...> * lib/ostruct.rb: Fix case of frozen object with initializer. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/