зеркало из https://github.com/github/ruby.git
don't use onig_recompile()
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
2d80e59b76
Коммит
8c5f9ef2ea
|
@ -1,3 +1,7 @@
|
|||
Mon May 15 21:37:12 2006 K.Kosako <sndgk393 AT ybb.ne.jp>
|
||||
|
||||
* re.c (rb_reg_prepare_re): don't use onig_recompile().
|
||||
|
||||
Sat May 13 16:14:05 2006 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* lib/pp.rb (PP.mcall): new method.
|
||||
|
|
18
re.c
18
re.c
|
@ -906,7 +906,7 @@ rb_reg_prepare_re(VALUE re)
|
|||
char err[ONIG_MAX_ERROR_MESSAGE_LEN];
|
||||
int r;
|
||||
OnigErrorInfo einfo;
|
||||
regex_t *reg;
|
||||
regex_t *reg, *reg2;
|
||||
UChar *pattern;
|
||||
|
||||
if (FL_TEST(re, KCODE_FIXED))
|
||||
|
@ -914,14 +914,18 @@ rb_reg_prepare_re(VALUE re)
|
|||
rb_reg_check(re);
|
||||
reg = RREGEXP(re)->ptr;
|
||||
pattern = ((UChar*)RREGEXP(re)->str);
|
||||
r = onig_recompile(reg, pattern, pattern + RREGEXP(re)->len,
|
||||
reg->options, onigenc_get_default_encoding(),
|
||||
OnigDefaultSyntax, &einfo);
|
||||
|
||||
if (r != 0) {
|
||||
(void )onig_error_code_to_str((UChar*)err, r, &einfo);
|
||||
rb_reg_raise(pattern, RREGEXP(re)->len, err, re, Qfalse);
|
||||
r = onig_new(®2, (UChar* )pattern,
|
||||
(UChar* )(pattern + RREGEXP(re)->len),
|
||||
reg->options, onigenc_get_default_encoding(),
|
||||
OnigDefaultSyntax, &einfo);
|
||||
if (r) {
|
||||
onig_error_code_to_str((UChar*)err, r, &einfo);
|
||||
rb_reg_raise((char* )pattern, RREGEXP(re)->len, err, re, Qfalse);
|
||||
}
|
||||
|
||||
RREGEXP(re)->ptr = reg2;
|
||||
onig_free(reg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#define RUBY_VERSION "1.9.0"
|
||||
#define RUBY_RELEASE_DATE "2006-05-13"
|
||||
#define RUBY_RELEASE_DATE "2006-05-15"
|
||||
#define RUBY_VERSION_CODE 190
|
||||
#define RUBY_RELEASE_CODE 20060513
|
||||
#define RUBY_RELEASE_CODE 20060515
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
#define RUBY_VERSION_MINOR 9
|
||||
#define RUBY_VERSION_TEENY 0
|
||||
#define RUBY_RELEASE_YEAR 2006
|
||||
#define RUBY_RELEASE_MONTH 5
|
||||
#define RUBY_RELEASE_DAY 13
|
||||
#define RUBY_RELEASE_DAY 15
|
||||
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
RUBY_EXTERN const char ruby_release_date[];
|
||||
|
|
Загрузка…
Ссылка в новой задаче