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

* file.c (file_load_ok): fix typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2001-07-16 04:22:46 +00:00
parent 03d1c9cd82
commit affcf615dc
2 changed files with 13 additions and 9 deletions

View file

@ -1,3 +1,7 @@
Man Jul 16 13:21:30 2001 Usaku Nakamura <usa@osb.att.ne.jp>
* file.c (file_load_ok): fix typo.
Sat Jul 14 12:26:30 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
* ext/digest/*/extconf.rb: fix so that they build from any

18
file.c
View file

@ -69,7 +69,7 @@ char *strrchr _((const char*,const char));
#ifndef HAVE_LSTAT
#define lstat(path,st) stat(path,st)
#endif
VALUE rb_cFile;
VALUE rb_mFileTest;
static VALUE rb_cStat;
@ -1384,7 +1384,7 @@ rb_file_s_expand_path(argc, argv)
if (*(s+1)) {
switch (*++s) {
case '.':
if (*(s+1) == '\0' || isdirsep(*(s+1))) {
if (*(s+1) == '\0' || isdirsep(*(s+1))) {
/* We must go back to the parent */
if (isdirsep(*p) && p > buf) p--;
while (p > buf && !isdirsep(*p)) p--;
@ -1399,7 +1399,7 @@ rb_file_s_expand_path(argc, argv)
#if defined DOSISH
case '\\':
#endif
if (!isdirsep(*p)) *++p = '/';
if (!isdirsep(*p)) *++p = '/';
break;
default:
*++p = '.'; *++p = *s; break;
@ -1415,7 +1415,7 @@ rb_file_s_expand_path(argc, argv)
*++p = *s;
}
}
/* Place a \0 at end. If path ends with a "/", delete it */
if (p == buf || !isdirsep(*p)) p++;
*p = '\0';
@ -1795,15 +1795,15 @@ rb_f_test(argc, argv)
if (st1.st_dev == st2.st_dev && st1.st_ino == st2.st_ino)
return Qtrue;
return Qfalse;
case '=':
if (st1.st_mtime == st2.st_mtime) return Qtrue;
return Qfalse;
case '>':
if (st1.st_mtime > st2.st_mtime) return Qtrue;
return Qfalse;
case '<':
if (st1.st_mtime < st2.st_mtime) return Qtrue;
return Qfalse;
@ -2174,7 +2174,7 @@ rb_path_check(path)
p = path;
pend = strchr(path, sep);
for (;;) {
int safe;
@ -2208,7 +2208,7 @@ file_load_ok(file)
{
FILE *f;
if (!f) return 0;
if (!file) return 0;
f = fopen(file, "r");
if (f == NULL) return 0;
fclose(f);