ruby-changes:15075
From: nobu <ko1@a...>
Date: Tue, 16 Mar 2010 14:48:23 +0900 (JST)
Subject: [ruby-changes:15075] Ruby:r26951 (trunk): * win32/win32.c (rb_w32_getcwd): remvoed duplicated code.
nobu 2010-03-16 14:48:07 +0900 (Tue, 16 Mar 2010) New Revision: 26951 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26951 Log: * win32/win32.c (rb_w32_getcwd): remvoed duplicated code. Modified files: trunk/ChangeLog trunk/win32/win32.c Index: ChangeLog =================================================================== --- ChangeLog (revision 26950) +++ ChangeLog (revision 26951) @@ -1,3 +1,7 @@ +Tue Mar 16 14:47:55 2010 Nobuyoshi Nakada <nobu@r...> + + * win32/win32.c (rb_w32_getcwd): remvoed duplicated code. + Tue Mar 16 14:06:13 2010 Nobuyoshi Nakada <nobu@r...> * include/ruby/encoding.h (ENC_TO_ENCINDEX): suppress warnings. Index: win32/win32.c =================================================================== --- win32/win32.c (revision 26950) +++ win32/win32.c (revision 26951) @@ -3579,7 +3579,6 @@ rb_w32_getcwd(char *buffer, int size) { char *p = buffer; - char *bp; int len; len = GetCurrentDirectory(0, NULL); @@ -3610,11 +3609,7 @@ return NULL; } - for (bp = p; *bp != '\0'; bp = CharNext(bp)) { - if (*bp == '\\') { - *bp = '/'; - } - } + translate_char(p, '\\', '/'); return p; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/