summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--ext/etc/etc.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index de57cf7..9c4836d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat Jun 22 13:43:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
+
+ * ext/etc/etc.c (etc_getpwnam): use PRIsVALUE in format string instead
+ of %s and RSTRING_PTR
+
+ * ext/etc/etc.c (etc_getgrnam): ditto
+
Sat Jun 22 13:07:15 2013 Tanaka Akira <akr@fsij.org>
* bignum.c (CLEAR_LOWBITS): Rewritten without RSHIFTX.
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 74a1fed..de06c74 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -183,7 +183,7 @@ etc_getpwnam(VALUE obj, VALUE nam)
SafeStringValue(nam);
pwd = getpwnam(RSTRING_PTR(nam));
- if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %s", RSTRING_PTR(nam));
+ if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %"PRIsVALUE, nam);
return setup_passwd(pwd);
#else
return Qnil;
@@ -426,7 +426,7 @@ etc_getgrnam(VALUE obj, VALUE nam)
SafeStringValue(nam);
grp = getgrnam(RSTRING_PTR(nam));
- if (grp == 0) rb_raise(rb_eArgError, "can't find group for %s", RSTRING_PTR(nam));
+ if (grp == 0) rb_raise(rb_eArgError, "can't find group for %"PRIsVALUE, nam);
return setup_group(grp);
#else
return Qnil;