From d393aa089353066c2ab036a0cbe2fff6563ed4f4 Mon Sep 17 00:00:00 2001 From: nagachika Date: Wed, 3 Apr 2013 17:25:09 +0000 Subject: 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ regexec.c | 9 ++++++--- tool/enc-unicode.rb | 2 +- version.h | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c21d3724c..d2a6d2f541 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Apr 4 02:24:59 2013 NARUSE, Yui + + * 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 * marshal.c (w_extended): check for prepended object. diff --git a/regexec.c b/regexec.c index 553186135b..3b75545bf0 100644 --- a/regexec.c +++ b/regexec.c @@ -3,7 +3,7 @@ **********************************************************************/ /*- * Copyright (c) 2002-2008 K.Kosako - * Copyright (c) 2011-2012 K.Takata + * Copyright (c) 2011-2013 K.Takata * 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, const UChar* end, 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 UChar* str, const UChar* end, } } 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 */ diff --git a/tool/enc-unicode.rb b/tool/enc-unicode.rb index 255d9c5175..b2f9d3da6c 100755 --- a/tool/enc-unicode.rb +++ b/tool/enc-unicode.rb @@ -187,7 +187,7 @@ def parse_age(data) 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}") diff --git a/version.h b/version.h index 2a978b17f5..825c9153e6 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #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 -- cgit v1.2.3