* file.c (istrailinggarbage): fixed typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-05-31 14:26:40 +00:00
parent 08e914f331
commit d6d8d973c8
3 changed files with 14 additions and 10 deletions

View File

@ -1,3 +1,7 @@
Sun May 31 23:26:36 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (istrailinggarbage): fixed typo.
Fri May 29 17:10:08 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> Fri May 29 17:10:08 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* struct.c (Init_Struct): made #to_s an alias to #inspect to * struct.c (Init_Struct): made #to_s an alias to #inspect to

16
file.c
View File

@ -2465,9 +2465,9 @@ rb_file_s_umask(int argc, VALUE *argv)
#endif #endif
#if USE_NTFS #if USE_NTFS
#define istrailinggabage(x) ((x) == '.' || (x) == ' ') #define istrailinggarbage(x) ((x) == '.' || (x) == ' ')
#else #else
#define istrailinggabage(x) 0 #define istrailinggarbage(x) 0
#endif #endif
#ifndef CharNext /* defined as CharNext[AW] on Windows. */ #ifndef CharNext /* defined as CharNext[AW] on Windows. */
@ -2608,9 +2608,9 @@ ntfs_tail(const char *path)
{ {
while (*path == '.') path++; while (*path == '.') path++;
while (*path && *path != ':') { while (*path && *path != ':') {
if (istrailinggabage(*path)) { if (istrailinggarbage(*path)) {
const char *last = path++; const char *last = path++;
while (istrailinggabage(*path)) path++; while (istrailinggarbage(*path)) path++;
if (!*path || *path == ':') return (char *)last; if (!*path || *path == ':') return (char *)last;
} }
else if (isdirsep(*path)) { else if (isdirsep(*path)) {
@ -2829,7 +2829,7 @@ file_expand_path(VALUE fname, VALUE dname, int abs_mode, VALUE result)
} }
#if USE_NTFS #if USE_NTFS
else { else {
do ++s; while (istrailinggabage(*s)); do ++s; while (istrailinggarbage(*s));
} }
#endif #endif
break; break;
@ -2849,7 +2849,7 @@ file_expand_path(VALUE fname, VALUE dname, int abs_mode, VALUE result)
--s; --s;
case ' ': { case ' ': {
const char *e = s; const char *e = s;
while (istrailinggabage(*s)) s++; while (istrailinggarbage(*s)) s++;
if (!*s) { if (!*s) {
s = e; s = e;
goto endpath; goto endpath;
@ -3221,10 +3221,10 @@ rb_file_s_extname(VALUE klass, VALUE fname)
e = 0; e = 0;
while (*p && *p == '.') p++; while (*p && *p == '.') p++;
while (*p) { while (*p) {
if (*p == '.' || istrailinggabage(*p)) { if (*p == '.' || istrailinggarbage(*p)) {
#if USE_NTFS #if USE_NTFS
const char *last = p++, *dot = last; const char *last = p++, *dot = last;
while (istrailinggabage(*p)) { while (istrailinggarbage(*p)) {
if (*p == '.') dot = p; if (*p == '.') dot = p;
p++; p++;
} }

View File

@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2" #define RUBY_VERSION "1.9.2"
#define RUBY_RELEASE_DATE "2009-05-29" #define RUBY_RELEASE_DATE "2009-05-31"
#define RUBY_PATCHLEVEL -1 #define RUBY_PATCHLEVEL -1
#define RUBY_BRANCH_NAME "trunk" #define RUBY_BRANCH_NAME "trunk"
@ -8,7 +8,7 @@
#define RUBY_VERSION_TEENY 1 #define RUBY_VERSION_TEENY 1
#define RUBY_RELEASE_YEAR 2009 #define RUBY_RELEASE_YEAR 2009
#define RUBY_RELEASE_MONTH 5 #define RUBY_RELEASE_MONTH 5
#define RUBY_RELEASE_DAY 29 #define RUBY_RELEASE_DAY 31
#include "ruby/version.h" #include "ruby/version.h"