mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 00:54:01 +02:00
* file.c (FILE_ALT_SEPARATOR): separated condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
32ed00ab18
commit
980a954f11
2 changed files with 10 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Mon Mar 15 07:16:09 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* file.c (FILE_ALT_SEPARATOR): separated condition.
|
||||||
|
|
||||||
Mon Mar 15 04:41:25 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Mon Mar 15 04:41:25 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* io.c (rb_io_each_codepoint): read directly when readconv is
|
* io.c (rb_io_each_codepoint): read directly when readconv is
|
||||||
|
|
9
file.c
9
file.c
|
@ -2491,7 +2491,10 @@ rb_file_s_umask(int argc, VALUE *argv)
|
||||||
#if defined __CYGWIN__ || defined DOSISH
|
#if defined __CYGWIN__ || defined DOSISH
|
||||||
#define DOSISH_UNC
|
#define DOSISH_UNC
|
||||||
#define DOSISH_DRIVE_LETTER
|
#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
|
#else
|
||||||
#define isdirsep(x) ((x) == '/')
|
#define isdirsep(x) ((x) == '/')
|
||||||
#endif
|
#endif
|
||||||
|
@ -5098,8 +5101,8 @@ Init_File(void)
|
||||||
rb_define_singleton_method(rb_cFile, "split", rb_file_s_split, 1);
|
rb_define_singleton_method(rb_cFile, "split", rb_file_s_split, 1);
|
||||||
rb_define_singleton_method(rb_cFile, "join", rb_file_s_join, -2);
|
rb_define_singleton_method(rb_cFile, "join", rb_file_s_join, -2);
|
||||||
|
|
||||||
#ifdef DOSISH
|
#ifdef FILE_ALT_SEPARATOR
|
||||||
rb_define_const(rb_cFile, "ALT_SEPARATOR", rb_obj_freeze(rb_usascii_str_new2("\\")));
|
rb_define_const(rb_cFile, "ALT_SEPARATOR", rb_obj_freeze(rb_usascii_str_new2(file_alt_separator)));
|
||||||
#else
|
#else
|
||||||
rb_define_const(rb_cFile, "ALT_SEPARATOR", Qnil);
|
rb_define_const(rb_cFile, "ALT_SEPARATOR", Qnil);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue