Skip to content

Commit 8c43fc0

Browse files
committed
merge revision(s) 40276: [Backport #8210]
* Merge Onigmo 5.13.4 f22cf2e566712cace60d17f84d63119d7c5764ee. [bug] fix problem with optimization of \z (Issue #16) [Bug #8210] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 80002f8 commit 8c43fc0

File tree

7 files changed

+17
-12
lines changed

7 files changed

+17
-12
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Sat Apr 20 01:31:38 2013 NARUSE, Yui <[email protected]>
2+
3+
* Merge Onigmo 5.13.4 f22cf2e566712cace60d17f84d63119d7c5764ee.
4+
[bug] fix problem with optimization of \z (Issue #16) [Bug #8210]
5+
16
Sat Apr 20 01:18:20 2013 Nobuyoshi Nakada <[email protected]>
27

38
* vm_insnhelper.c (vm_callee_setup_keyword_arg): non-symbol key is not

include/ruby/oniguruma.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
**********************************************************************/
66
/*-
77
* Copyright (c) 2002-2009 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
8-
* Copyright (c) 2011-2012 K.Takata <kentkt AT csc DOT jp>
8+
* Copyright (c) 2011-2013 K.Takata <kentkt AT csc DOT jp>
99
* All rights reserved.
1010
*
1111
* Redistribution and use in source and binary forms, with or without
@@ -40,7 +40,7 @@ extern "C" {
4040
#define ONIGURUMA
4141
#define ONIGURUMA_VERSION_MAJOR 5
4242
#define ONIGURUMA_VERSION_MINOR 13
43-
#define ONIGURUMA_VERSION_TEENY 3
43+
#define ONIGURUMA_VERSION_TEENY 4
4444

4545
#ifdef __cplusplus
4646
# ifndef HAVE_PROTOTYPES

regcomp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4990,7 +4990,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
49904990
int i, z;
49914991
CClassNode* cc = NCCLASS(node);
49924992

4993-
/* no need to check ignore case. (setted in setup_tree()) */
4993+
/* no need to check ignore case. (set in setup_tree()) */
49944994

49954995
if (IS_NOT_NULL(cc->mbuf) || IS_NCCLASS_NOT(cc)) {
49964996
OnigDistance min = ONIGENC_MBC_MINLEN(env->enc);

regexec.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4020,15 +4020,14 @@ onig_search_gpos(regex_t* reg, const UChar* str, const UChar* end,
40204020
start = min_semi_end - reg->anchor_dmax;
40214021
if (start < end)
40224022
start = onigenc_get_right_adjust_char_head(reg->enc, str, start, end);
4023-
else { /* match with empty at end */
4024-
start = onigenc_get_prev_char_head(reg->enc, str, end, end);
4025-
}
40264023
}
40274024
if ((OnigDistance )(max_semi_end - (range - 1)) < reg->anchor_dmin) {
40284025
range = max_semi_end - reg->anchor_dmin + 1;
40294026
}
40304027

4031-
if (start >= range) goto mismatch_no_msa;
4028+
if (start > range) goto mismatch_no_msa;
4029+
/* If start == range, match with empty at end.
4030+
Backward search is used. */
40324031
}
40334032
else {
40344033
if ((OnigDistance )(min_semi_end - range) > reg->anchor_dmax) {
@@ -4258,7 +4257,7 @@ onig_search_gpos(regex_t* reg, const UChar* str, const UChar* end,
42584257
ONIG_STATE_DEC_THREAD(reg);
42594258

42604259
/* If result is mismatch and no FIND_NOT_EMPTY option,
4261-
then the region is not setted in match_at(). */
4260+
then the region is not set in match_at(). */
42624261
if (IS_FIND_NOT_EMPTY(reg->options) && region
42634262
#ifdef USE_POSIX_API_REGION_OPTION
42644263
&& !IS_POSIX_REGION(option)

regint.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ typedef struct _OnigStackType {
805805
struct {
806806
int num; /* memory num */
807807
UChar *pstr; /* start/end position */
808-
/* Following information is setted, if this stack type is MEM-START */
808+
/* Following information is set, if this stack type is MEM-START */
809809
OnigStackIndex start; /* prev. info (for backtrack "(...)*" ) */
810810
OnigStackIndex end; /* prev. info (for backtrack "(...)*" ) */
811811
} mem;
@@ -878,6 +878,7 @@ typedef void hash_table_type;
878878
#include "ruby/st.h"
879879
typedef st_data_t hash_data_type;
880880
#else
881+
#include "st.h"
881882
typedef uintptr_t hash_data_type;
882883
#endif
883884

regparse.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,7 @@ str_node_split_last_char(StrNode* sn, OnigEncoding enc)
15801580

15811581
if (sn->end > sn->s) {
15821582
p = onigenc_get_prev_char_head(enc, sn->s, sn->end, sn->end);
1583-
if (p && p > sn->s) { /* can be splitted. */
1583+
if (p && p > sn->s) { /* can be split. */
15841584
n = node_new_str(p, sn->end);
15851585
if (IS_NOT_NULL(n) && (sn->flag & NSTR_RAW) != 0)
15861586
NSTRING_SET_RAW(n);
@@ -3201,7 +3201,7 @@ fetch_token_in_cc(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
32013201
else if (c == '[') {
32023202
if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_POSIX_BRACKET) && (PPEEK_IS(':'))) {
32033203
OnigCodePoint send[] = { (OnigCodePoint )':', (OnigCodePoint )']' };
3204-
tok->backp = p; /* point at '[' is readed */
3204+
tok->backp = p; /* point at '[' is read */
32053205
PINC;
32063206
if (str_exist_check_with_esc(send, 2, p, end,
32073207
(OnigCodePoint )']', enc, syn)) {

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define RUBY_VERSION "2.0.0"
22
#define RUBY_RELEASE_DATE "2013-04-20"
3-
#define RUBY_PATCHLEVEL 149
3+
#define RUBY_PATCHLEVEL 150
44

55
#define RUBY_RELEASE_YEAR 2013
66
#define RUBY_RELEASE_MONTH 4

0 commit comments

Comments
 (0)