summaryrefslogtreecommitdiff
path: root/ext/etc
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-24 04:34:26 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-24 04:34:26 +0000
commit8b1de0b1ad49733abeddd8be359ae816b29de59a (patch)
treea7ed03dd3f6442635f694c4367bcd94be57f6dbd /ext/etc
parent24b9bdca25dc431aff935df7739b9c5ea0ee4077 (diff)
2000-05-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/etc')
-rw-r--r--ext/etc/etc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 049b94e..ee0cd52 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -133,7 +133,7 @@ etc_passwd(obj)
#ifdef HAVE_GETPWENT
struct passwd *pw;
- if (rb_iterator_p()) {
+ if (rb_block_given_p()) {
setpwent();
while (pw = getpwent()) {
rb_yield(setup_passwd(pw));
@@ -210,7 +210,7 @@ etc_group(obj)
#ifdef HAVE_GETGRENT
struct group *grp;
- if (rb_iterator_p()) {
+ if (rb_block_given_p()) {
setgrent();
while (grp = getgrent()) {
rb_yield(setup_group(grp));