diff --git a/ChangeLog b/ChangeLog index de57cf78d8..9c4836d61a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Jun 22 13:43:00 2013 Charlie Somerville + + * 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 * bignum.c (CLEAR_LOWBITS): Rewritten without RSHIFTX. diff --git a/ext/etc/etc.c b/ext/etc/etc.c index 74a1fedbeb..de06c74947 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;