mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* file.c (rb_file_s_dirname): append "." if drive only.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6f780a30fc
commit
4ef1062c6f
2 changed files with 7 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
Wed Feb 12 23:42:10 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
Thu Feb 13 00:09:47 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* file.c (strrdirsep): ignore trailing directory separators.
|
* file.c (strrdirsep): ignore trailing directory separators.
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@ Wed Feb 12 23:42:10 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* file.c (rb_file_s_dirname, rb_file_s_extname): ditto.
|
* file.c (rb_file_s_dirname, rb_file_s_extname): ditto.
|
||||||
|
|
||||||
|
* file.c (rb_file_s_dirname): append "." if drive only.
|
||||||
|
|
||||||
* file.c (rb_file_s_split): get rid of converting twice.
|
* file.c (rb_file_s_split): get rid of converting twice.
|
||||||
|
|
||||||
Mon Feb 10 20:55:15 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
Mon Feb 10 20:55:15 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||||
|
|
4
file.c
4
file.c
|
@ -1784,6 +1784,10 @@ rb_file_s_dirname(klass, fname)
|
||||||
if (p == name)
|
if (p == name)
|
||||||
return rb_str_new2(".");
|
return rb_str_new2(".");
|
||||||
dirname = rb_str_new(name, p - name);
|
dirname = rb_str_new(name, p - name);
|
||||||
|
#ifdef DOSISH_DRIVE_LETTER
|
||||||
|
if (root == name + 2 && name[1] == ':')
|
||||||
|
rb_str_cat(dirname, ".", 1);
|
||||||
|
#endif
|
||||||
OBJ_INFECT(dirname, fname);
|
OBJ_INFECT(dirname, fname);
|
||||||
return dirname;
|
return dirname;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue