From fedc8075fe2a2bbbfa12c028c0879330d7db5596 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 16 Apr 2020 20:40:53 +0900 Subject: Preserve encoding in error messages for invalid user/group name --- process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'process.c') diff --git a/process.c b/process.c index 129a2e6706..efe9984348 100644 --- a/process.c +++ b/process.c @@ -5585,7 +5585,7 @@ obj2uid(VALUE id #ifndef USE_GETPWNAM_R endpwent(); #endif - rb_raise(rb_eArgError, "can't find user for %s", usrname); + rb_raise(rb_eArgError, "can't find user for %"PRIsVALUE, id); } uid = pwptr->pw_uid; #ifndef USE_GETPWNAM_R @@ -5664,7 +5664,7 @@ obj2gid(VALUE id #if !defined(USE_GETGRNAM_R) && defined(HAVE_ENDGRENT) endgrent(); #endif - rb_raise(rb_eArgError, "can't find group for %s", grpname); + rb_raise(rb_eArgError, "can't find group for %"PRIsVALUE, id); } gid = grptr->gr_gid; #if !defined(USE_GETGRNAM_R) && defined(HAVE_ENDGRENT) -- cgit v1.2.3