summaryrefslogtreecommitdiff
path: root/ext/etc
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-12-18 08:47:06 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-12-18 08:47:06 +0000
commit35f851bcfe7e42ddf1b44606d2df4d4be9de9976 (patch)
tree22b6a55b921d76a6d432f0a2156496ccb827be73 /ext/etc
parentcd956b3114c1b59de6660e1c70be192c6ee29235 (diff)
* string.c (rb_str_replace): swap arguments of OBJ_INFECT.
* eval.c (rb_thread_schedule): should not select a thread which is not yet initialized. * time.c (time_plus): wrong boundary check. * time.c (time_minus): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1918 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 ee0cd52..5c54237 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);