1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* regex.c (re_match_exec): $ _always_ matches at the end of string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2003-05-01 00:00:37 +00:00
parent d9d40c0d79
commit 4bdf9a6c61
3 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Thu May 1 08:24:00 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* regex.c (re_match_exec): $ _always_ matches at the end of string.
Wed Apr 30 14:12:00 2003 wanowa.kimura@nifty.ne.jp (kimura wataru) Wed Apr 30 14:12:00 2003 wanowa.kimura@nifty.ne.jp (kimura wataru)
* net/imap.rb: support THREAD extension. * net/imap.rb: support THREAD extension.

6
file.c
View file

@ -2045,6 +2045,7 @@ rb_file_flock(obj, operation)
if (fptr->mode & FMODE_WRITABLE) { if (fptr->mode & FMODE_WRITABLE) {
fflush(GetWriteFile(fptr)); fflush(GetWriteFile(fptr));
} }
retry:
TRAP_BEG; TRAP_BEG;
ret = flock(fileno(fptr->f), NUM2INT(operation)); ret = flock(fileno(fptr->f), NUM2INT(operation));
TRAP_END; TRAP_END;
@ -2056,6 +2057,11 @@ rb_file_flock(obj, operation)
case EWOULDBLOCK: case EWOULDBLOCK:
#endif #endif
return Qfalse; return Qfalse;
case EINTR:
#if defined(ERESTART)
case ERESTART:
#endif
goto retry;
} }
rb_sys_fail(fptr->path); rb_sys_fail(fptr->path);
} }

View file

@ -3883,8 +3883,7 @@ re_match_exec(bufp, string_arg, size, pos, beg, regs)
case endline: case endline:
if (AT_STRINGS_END(d)) { if (AT_STRINGS_END(d)) {
if (size == 0 || d[-1] != '\n') break;
break;
} }
else if (*d == '\n') else if (*d == '\n')
break; break;