ruby-changes:10865
From: nobu <ko1@a...>
Date: Thu, 19 Feb 2009 15:14:37 +0900 (JST)
Subject: [ruby-changes:10865] Ruby:r22438 (trunk): * ext/etc/etc.c (etc_each_group): defines only when Etc::Group is
nobu 2009-02-19 15:14:27 +0900 (Thu, 19 Feb 2009) New Revision: 22438 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22438 Log: * ext/etc/etc.c (etc_each_group): defines only when Etc::Group is available. Modified files: trunk/ChangeLog trunk/ext/etc/etc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 22437) +++ ChangeLog (revision 22438) @@ -1,3 +1,8 @@ +Thu Feb 19 15:14:25 2009 Nobuyoshi Nakada <nobu@r...> + + * ext/etc/etc.c (etc_each_group): defines only when Etc::Group is + available. + Thu Feb 19 15:11:40 2009 Nobuyoshi Nakada <nobu@r...> * eval_intern.h (translit_char): moved from ruby.c. Index: ext/etc/etc.c =================================================================== --- ext/etc/etc.c (revision 22437) +++ ext/etc/etc.c (revision 22438) @@ -468,6 +468,7 @@ return Qnil; } +#ifdef HAVE_GETPWENT /* Iterates for each entry in the /etc/group file if a block is given. * If no block is given, returns the enumerator. * @@ -489,12 +490,11 @@ static VALUE etc_each_group(VALUE obj) { -#ifdef HAVE_GETPWENT RETURN_ENUMERATOR(obj, 0, 0); each_group(); -#endif return obj; } +#endif /* Resets the process of reading the /etc/group file, so that the next call * to getgrent will return the first entry again. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/