mirror of
https://github.com/ruby/ruby.git
synced 2025-08-16 05:59:00 +02:00
* regex.c (re_search): should consider reverse search.
* dir.c (dir_s_chdir): warn only when invoked from multiple threads or block is not given. * object.c (rb_convert_type): should use rb_rescue(), not rb_rescue2(). * range.c (range_init): ditto. * object.c (rb_obj_dup): should free generic_ivar if original owns them. * string.c (rb_str_each_line): should propagate taint mark. * ext/nkf/nkf.c (rb_nkf_kconv): ditto. * eval.c (rb_f_require): revamp for simpler implementation. * file.c (rb_find_file_noext): use String object, instead of passing char* around. * file.c (rb_find_file): ditto. * dln.c (dln_load): should use NSLINKMODULE_OPTION_BINDNOW. * ruby.c (load_file): local variables 'c' remain uninitialized on xflag. * regex.c (re_match): prefetched escaped character too early. * eval.c (rb_call0): add argument check for attr_readers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f4b516777b
commit
03d1c9cd82
18 changed files with 959 additions and 446 deletions
4
regex.c
4
regex.c
|
@ -3264,7 +3264,7 @@ re_search(bufp, string, size, startpos, range, regs)
|
|||
}
|
||||
|
||||
if (startpos > size) return -1;
|
||||
if ((anchor || !bufp->can_be_null) && size > 0 && startpos == size)
|
||||
if ((anchor || !bufp->can_be_null) && range > 0 && size > 0 && startpos == size)
|
||||
return -1;
|
||||
val = re_match(bufp, string, size, startpos, regs);
|
||||
if (val >= 0) return startpos;
|
||||
|
@ -4237,7 +4237,6 @@ re_match(bufp, string_arg, size, pos, regs)
|
|||
unsigned char c;
|
||||
|
||||
PREFETCH;
|
||||
c = *d++;
|
||||
if (*p == 0xff) {
|
||||
p++;
|
||||
if (!--mcnt
|
||||
|
@ -4246,6 +4245,7 @@ re_match(bufp, string_arg, size, pos, regs)
|
|||
goto fail;
|
||||
continue;
|
||||
}
|
||||
c = *d++;
|
||||
if (ismbchar(c)) {
|
||||
int n;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue