summaryrefslogtreecommitdiff
path: root/ext/etc
diff options
context:
space:
mode:
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 ee0cd529e4a..5c54237b7ab 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -117,7 +117,7 @@ etc_getpwnam(obj, nam)
#ifdef HAVE_GETPWENT
struct passwd *pwd;
- Check_Type(nam, T_STRING);
+ StringValue(nam);
pwd = getpwnam(RSTRING(nam)->ptr);
if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %s", RSTRING(nam)->ptr);
return setup_passwd(pwd);
@@ -194,7 +194,7 @@ etc_getgrnam(obj, nam)
#ifdef HAVE_GETGRENT
struct group *grp;
- Check_Type(nam, T_STRING);
+ StringValue(nam);
grp = getgrnam(RSTRING(nam)->ptr);
if (grp == 0) rb_raise(rb_eArgError, "can't find group for %s", RSTRING(nam)->ptr);
return setup_group(grp);