mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* regexec.c (onig_search): fix problem with optimization of \z.
[Backport #8210] patched by k_tanaka at [ruby-core:54251]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@40713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
95d36502f5
commit
e8905e1042
3 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
Tue May 14 10:39:33 2013 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* regexec.c (onig_search): fix problem with optimization of \z.
|
||||
[Backport #8210]
|
||||
patched by k_tanaka at [ruby-core:54251].
|
||||
|
||||
Tue May 14 09:36:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* time.c (GetTimeval): check if already initialized instance.
|
||||
|
|
|
@ -3515,15 +3515,14 @@ onig_search(regex_t* reg, const UChar* str, const UChar* end,
|
|||
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) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#define RUBY_VERSION "1.9.3"
|
||||
#define RUBY_PATCHLEVEL 417
|
||||
#define RUBY_PATCHLEVEL 418
|
||||
|
||||
#define RUBY_RELEASE_DATE "2013-05-14"
|
||||
#define RUBY_RELEASE_YEAR 2013
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue