ruby-changes:15051
From: nobu <ko1@a...>
Date: Mon, 15 Mar 2010 07:16:33 +0900 (JST)
Subject: [ruby-changes:15051] Ruby:r26927 (trunk): * file.c (FILE_ALT_SEPARATOR): separated condition.
nobu 2010-03-15 07:16:12 +0900 (Mon, 15 Mar 2010) New Revision: 26927 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26927 Log: * file.c (FILE_ALT_SEPARATOR): separated condition. Modified files: trunk/ChangeLog trunk/file.c Index: ChangeLog =================================================================== --- ChangeLog (revision 26926) +++ ChangeLog (revision 26927) @@ -1,3 +1,7 @@ +Mon Mar 15 07:16:09 2010 Nobuyoshi Nakada <nobu@r...> + + * file.c (FILE_ALT_SEPARATOR): separated condition. + Mon Mar 15 04:41:25 2010 Nobuyoshi Nakada <nobu@r...> * io.c (rb_io_each_codepoint): read directly when readconv is Index: file.c =================================================================== --- file.c (revision 26926) +++ file.c (revision 26927) @@ -2491,7 +2491,10 @@ #if defined __CYGWIN__ || defined DOSISH #define DOSISH_UNC #define DOSISH_DRIVE_LETTER -#define isdirsep(x) ((x) == '/' || (x) == '\\') +#define FILE_ALT_SEPARATOR '\\' +#endif +#ifdef FILE_ALT_SEPARATOR +#define isdirsep(x) ((x) == '/' || (x) == FILE_ALT_SEPARATOR) #else #define isdirsep(x) ((x) == '/') #endif @@ -5098,8 +5101,8 @@ rb_define_singleton_method(rb_cFile, "split", rb_file_s_split, 1); rb_define_singleton_method(rb_cFile, "join", rb_file_s_join, -2); -#ifdef DOSISH - rb_define_const(rb_cFile, "ALT_SEPARATOR", rb_obj_freeze(rb_usascii_str_new2("\\"))); +#ifdef FILE_ALT_SEPARATOR + rb_define_const(rb_cFile, "ALT_SEPARATOR", rb_obj_freeze(rb_usascii_str_new2(file_alt_separator))); #else rb_define_const(rb_cFile, "ALT_SEPARATOR", Qnil); #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/