diff options
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1747,8 +1747,8 @@ rb_file_chown(obj, owner, group) int o, g; rb_secure(2); - o = NUM2INT(owner); - g = NUM2INT(group); + o = NIL_P(owner) ? -1 : NUM2INT(owner); + g = NIL_P(group) ? -1 : NUM2INT(group); GetOpenFile(obj, fptr); #if defined(DJGPP) || defined(__CYGWIN32__) || defined(_WIN32) || defined(__EMX__) if (!fptr->path) return Qnil; |