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

ruby-changes:28036

From: nagachika <ko1@a...>
Date: Thu, 4 Apr 2013 02:25:19 +0900 (JST)
Subject: [ruby-changes:28036] nagachika:r40088 (ruby_2_0_0): merge revision(s) 39718: [Backport #8001] [Backport #8023]

nagachika	2013-04-04 02:25:09 +0900 (Thu, 04 Apr 2013)

  New Revision: 40088

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40088

  Log:
    merge revision(s) 39718: [Backport #8001] [Backport #8023]
    
    * Merge Onigmo d4bad41e16e3eccd97ccce6f1f96712e557c4518.
      fix lookbehind assertion fails with /m mode enabled. [Bug #8023]
      fix \Z matches where it shouldn't. [Bug #8001]

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/regexec.c
    branches/ruby_2_0_0/tool/enc-unicode.rb
    branches/ruby_2_0_0/version.h

Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 40087)
+++ ruby_2_0_0/ChangeLog	(revision 40088)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Thu Apr  4 02:24:59 2013  NARUSE, Yui  <naruse@r...>
+
+	* Merge Onigmo d4bad41e16e3eccd97ccce6f1f96712e557c4518.
+	  fix lookbehind assertion fails with /m mode enabled. [Bug #8023]
+	  fix \Z matches where it shouldn't. [Bug #8001]
+
 Thu Apr  4 02:11:30 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* marshal.c (w_extended): check for prepended object.
Index: ruby_2_0_0/regexec.c
===================================================================
--- ruby_2_0_0/regexec.c	(revision 40087)
+++ ruby_2_0_0/regexec.c	(revision 40088)
@@ -3,7 +3,7 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/regexec.c#L3
 **********************************************************************/
 /*-
  * Copyright (c) 2002-2008  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
- * Copyright (c) 2011-2012  K.Takata  <kentkt AT csc DOT jp>
+ * Copyright (c) 2011-2013  K.Takata  <kentkt AT csc DOT jp>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -2219,7 +2219,8 @@ match_at(regex_t* reg, const UChar* str, https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/regexec.c#L2219
 	  continue;
 	}
 #ifdef USE_CRNL_AS_LINE_TERMINATOR
-	else if (ss < end) {
+	else if (IS_NEWLINE_CRLF(option)
+	    && ONIGENC_IS_MBC_CRNL(encode, s, end)) {
 	  ss += enclen(encode, ss, end);
 	  if (ON_STR_END(ss)) {
 	    MOP_OUT;
@@ -4065,7 +4066,9 @@ onig_search_gpos(regex_t* reg, const UCh https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/regexec.c#L4066
       }
     }
     else if ((reg->anchor & ANCHOR_ANYCHAR_STAR_ML)) {
-      goto begin_position;
+      if (! (reg->anchor & ANCHOR_LOOK_BEHIND)) {
+	goto begin_position;
+      }
     }
   }
   else if (str == end) { /* empty string */
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 40087)
+++ ruby_2_0_0/version.h	(revision 40088)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2013-04-04"
-#define RUBY_PATCHLEVEL 103
+#define RUBY_PATCHLEVEL 104
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 4
Index: ruby_2_0_0/tool/enc-unicode.rb
===================================================================
--- ruby_2_0_0/tool/enc-unicode.rb	(revision 40087)
+++ ruby_2_0_0/tool/enc-unicode.rb	(revision 40088)
@@ -187,7 +187,7 @@ def parse_age(data) https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/tool/enc-unicode.rb#L187
   IO.foreach(get_file('DerivedAge.txt')) do |line|
     if /^# Total code points: / =~ line
       constname = constantize_agename(current)
-			# each version matches all previous versions
+      # each version matches all previous versions
       cps.concat(data[last_constname]) if last_constname
       data[constname] = cps
       make_const(constname, cps, "Derived Age #{current}")

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r39718


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

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