ruby-changes:28332
From: nagachika <ko1@a...>
Date: Sat, 20 Apr 2013 01:40:43 +0900 (JST)
Subject: [ruby-changes:28332] nagachika:r40384 (ruby_2_0_0): merge revision(s) 40276: [Backport #8210]
nagachika 2013-04-20 01:40:32 +0900 (Sat, 20 Apr 2013) New Revision: 40384 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40384 Log: merge revision(s) 40276: [Backport #8210] * Merge Onigmo 5.13.4 f22cf2e566712cace60d17f84d63119d7c5764ee. [bug] fix problem with optimization of \z (Issue #16) [Bug #8210] Modified directories: branches/ruby_2_0_0/ Modified files: branches/ruby_2_0_0/ChangeLog branches/ruby_2_0_0/include/ruby/oniguruma.h branches/ruby_2_0_0/regcomp.c branches/ruby_2_0_0/regexec.c branches/ruby_2_0_0/regint.h branches/ruby_2_0_0/regparse.c branches/ruby_2_0_0/version.h Index: ruby_2_0_0/regparse.c =================================================================== --- ruby_2_0_0/regparse.c (revision 40383) +++ ruby_2_0_0/regparse.c (revision 40384) @@ -1580,7 +1580,7 @@ str_node_split_last_char(StrNode* sn, On https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/regparse.c#L1580 if (sn->end > sn->s) { p = onigenc_get_prev_char_head(enc, sn->s, sn->end, sn->end); - if (p && p > sn->s) { /* can be splitted. */ + if (p && p > sn->s) { /* can be split. */ n = node_new_str(p, sn->end); if (IS_NOT_NULL(n) && (sn->flag & NSTR_RAW) != 0) NSTRING_SET_RAW(n); @@ -3201,7 +3201,7 @@ fetch_token_in_cc(OnigToken* tok, UChar* https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/regparse.c#L3201 else if (c == '[') { if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_POSIX_BRACKET) && (PPEEK_IS(':'))) { OnigCodePoint send[] = { (OnigCodePoint )':', (OnigCodePoint )']' }; - tok->backp = p; /* point at '[' is readed */ + tok->backp = p; /* point at '[' is read */ PINC; if (str_exist_check_with_esc(send, 2, p, end, (OnigCodePoint )']', enc, syn)) { Index: ruby_2_0_0/regcomp.c =================================================================== --- ruby_2_0_0/regcomp.c (revision 40383) +++ ruby_2_0_0/regcomp.c (revision 40384) @@ -4990,7 +4990,7 @@ optimize_node_left(Node* node, NodeOptIn https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/regcomp.c#L4990 int i, z; CClassNode* cc = NCCLASS(node); - /* no need to check ignore case. (setted in setup_tree()) */ + /* no need to check ignore case. (set in setup_tree()) */ if (IS_NOT_NULL(cc->mbuf) || IS_NCCLASS_NOT(cc)) { OnigDistance min = ONIGENC_MBC_MINLEN(env->enc); Index: ruby_2_0_0/include/ruby/oniguruma.h =================================================================== --- ruby_2_0_0/include/ruby/oniguruma.h (revision 40383) +++ ruby_2_0_0/include/ruby/oniguruma.h (revision 40384) @@ -5,7 +5,7 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/include/ruby/oniguruma.h#L5 **********************************************************************/ /*- * Copyright (c) 2002-2009 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 @@ -40,7 +40,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/include/ruby/oniguruma.h#L40 #define ONIGURUMA #define ONIGURUMA_VERSION_MAJOR 5 #define ONIGURUMA_VERSION_MINOR 13 -#define ONIGURUMA_VERSION_TEENY 3 +#define ONIGURUMA_VERSION_TEENY 4 #ifdef __cplusplus # ifndef HAVE_PROTOTYPES Index: ruby_2_0_0/ChangeLog =================================================================== --- ruby_2_0_0/ChangeLog (revision 40383) +++ ruby_2_0_0/ChangeLog (revision 40384) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1 +Sat Apr 20 01:31:38 2013 NARUSE, Yui <naruse@r...> + + * Merge Onigmo 5.13.4 f22cf2e566712cace60d17f84d63119d7c5764ee. + [bug] fix problem with optimization of \z (Issue #16) [Bug #8210] + Sat Apr 20 01:18:20 2013 Nobuyoshi Nakada <nobu@r...> * vm_insnhelper.c (vm_callee_setup_keyword_arg): non-symbol key is not Index: ruby_2_0_0/regint.h =================================================================== --- ruby_2_0_0/regint.h (revision 40383) +++ ruby_2_0_0/regint.h (revision 40384) @@ -805,7 +805,7 @@ typedef struct _OnigStackType { https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/regint.h#L805 struct { int num; /* memory num */ UChar *pstr; /* start/end position */ - /* Following information is setted, if this stack type is MEM-START */ + /* Following information is set, if this stack type is MEM-START */ OnigStackIndex start; /* prev. info (for backtrack "(...)*" ) */ OnigStackIndex end; /* prev. info (for backtrack "(...)*" ) */ } mem; @@ -878,6 +878,7 @@ typedef void hash_table_type; https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/regint.h#L878 #include "ruby/st.h" typedef st_data_t hash_data_type; #else +#include "st.h" typedef uintptr_t hash_data_type; #endif Index: ruby_2_0_0/regexec.c =================================================================== --- ruby_2_0_0/regexec.c (revision 40383) +++ ruby_2_0_0/regexec.c (revision 40384) @@ -4020,15 +4020,14 @@ onig_search_gpos(regex_t* reg, const UCh https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/regexec.c#L4020 start = min_semi_end - reg->anchor_dmax; if (start < end) start = onigenc_get_right_adjust_char_head(reg->enc, str, start, end); - else { /* match with empty at end */ - start = onigenc_get_prev_char_head(reg->enc, str, end, end); - } } if ((OnigDistance )(max_semi_end - (range - 1)) < reg->anchor_dmin) { range = max_semi_end - reg->anchor_dmin + 1; } - if (start >= range) goto mismatch_no_msa; + if (start > range) goto mismatch_no_msa; + /* If start == range, match with empty at end. + Backward search is used. */ } else { if ((OnigDistance )(min_semi_end - range) > reg->anchor_dmax) { @@ -4258,7 +4257,7 @@ onig_search_gpos(regex_t* reg, const UCh https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/regexec.c#L4257 ONIG_STATE_DEC_THREAD(reg); /* If result is mismatch and no FIND_NOT_EMPTY option, - then the region is not setted in match_at(). */ + then the region is not set in match_at(). */ if (IS_FIND_NOT_EMPTY(reg->options) && region #ifdef USE_POSIX_API_REGION_OPTION && !IS_POSIX_REGION(option) Index: ruby_2_0_0/version.h =================================================================== --- ruby_2_0_0/version.h (revision 40383) +++ ruby_2_0_0/version.h (revision 40384) @@ -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-20" -#define RUBY_PATCHLEVEL 149 +#define RUBY_PATCHLEVEL 150 #define RUBY_RELEASE_YEAR 2013 #define RUBY_RELEASE_MONTH 4 Property changes on: ruby_2_0_0 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r40276 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/