[前][次][番号順一覧][スレッド一覧]

ruby-changes:41362

From: naruse <ko1@a...>
Date: Mon, 4 Jan 2016 16:59:49 +0900 (JST)
Subject: [ruby-changes:41362] naruse:r53434 (trunk): Revert r53431 "temporally revert r53411 to debug"

naruse	2016-01-04 16:59:55 +0900 (Mon, 04 Jan 2016)

  New Revision: 53434

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53434

  Log:
    Revert r53431 "temporally revert r53411 to debug"

  Modified files:
    trunk/parse.y
    trunk/test/ripper/test_ripper.rb
Index: test/ripper/test_ripper.rb
===================================================================
--- test/ripper/test_ripper.rb	(revision 53433)
+++ test/ripper/test_ripper.rb	(revision 53434)
@@ -60,4 +60,16 @@ class TestRipper::Ripper < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/test/ripper/test_ripper.rb#L60
 
     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: parse.y
===================================================================
--- parse.y	(revision 53433)
+++ parse.y	(revision 53434)
@@ -4042,7 +4042,7 @@ regexp		: tREGEXP_BEG regexp_contents tR https://github.com/ruby/ruby/blob/trunk/parse.y#L4042
 			}
 			if (ripper_is_node_yylval(opt)) {
 			    $3 = RNODE(opt)->nd_rval;
-			    options = (int)RNODE(opt)->nd_state;
+			    options = (int)RNODE(opt)->nd_tag;
 			}
 			if (src && NIL_P(rb_parser_reg_compile(parser, src, options, &err))) {
 			    compile_error(PARSER_ARG "%"PRIsVALUE, err);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]