ruby-changes:4316
From: ko1@a...
Date: Wed, 19 Mar 2008 21:01:26 +0900 (JST)
Subject: [ruby-changes:4316] nobu - Ruby:r15806 (ruby_1_8): * dir.c (dir_inspect, dir_path, dir_tell): check for frozen and closed
nobu 2008-03-19 21:01:10 +0900 (Wed, 19 Mar 2008) New Revision: 15806 Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/dir.c Log: * dir.c (dir_inspect, dir_path, dir_tell): check for frozen and closed is not needed. [ruby-dev:32640] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=15806&r2=15805&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/dir.c?r1=15806&r2=15805&diff_format=u Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 15805) +++ ruby_1_8/ChangeLog (revision 15806) @@ -1,3 +1,8 @@ +Wed Mar 19 21:01:08 2008 Nobuyoshi Nakada <nobu@r...> + + * dir.c (dir_inspect, dir_path, dir_tell): check for frozen and closed + is not needed. [ruby-dev:32640] + Wed Mar 19 20:25:40 2008 Nobuyoshi Nakada <nobu@r...> * dir.c (Init_Dir): define inspect method. [ruby-core:15960] Index: ruby_1_8/dir.c =================================================================== --- ruby_1_8/dir.c (revision 15805) +++ ruby_1_8/dir.c (revision 15806) @@ -268,7 +268,7 @@ const char *t; if (ISEND(s)) RETURN(FNM_NOMATCH); - if (t = bracket(p + 1, s, flags)) { + if ((t = bracket(p + 1, s, flags)) != 0) { p = t; Inc(s); continue; @@ -473,7 +473,7 @@ { struct dir_data *dirp; - GetDIR(dir, dirp); + Data_Get_Struct(dir, struct dir_data, dirp); if (dirp->path) { char *c = rb_obj_classname(dir); int len = strlen(c) + strlen(dirp->path) + 4; @@ -499,7 +499,7 @@ { struct dir_data *dirp; - GetDIR(dir, dirp); + Data_Get_Struct(dir, struct dir_data, dirp); if (!dirp->path) return Qnil; return rb_str_new2(dirp->path); } @@ -592,7 +592,7 @@ struct dir_data *dirp; long pos; - GetDIR(dir, dirp); + Data_Get_Struct(dir, struct dir_data, dirp); pos = telldir(dirp->dir); return rb_int2inum(pos); #else @@ -1008,7 +1008,7 @@ register const char *p = s; register char c; - while (c = *p++) { + while ((c = *p++) != 0) { switch (c) { case '*': case '?': @@ -1041,7 +1041,7 @@ register char c; int open = 0; - while (c = *p++) { + while ((c = *p++) != 0) { switch (c) { case '[': open = 1; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/