summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index c1f26ab692..30c07e0065 100644
--- a/file.c
+++ b/file.c
@@ -1747,9 +1747,9 @@ rb_file_chown(obj, owner, group)
int o, g;
rb_secure(2);
- GetOpenFile(obj, fptr);
o = NUM2INT(owner);
g = NUM2INT(group);
+ GetOpenFile(obj, fptr);
#if defined(DJGPP) || defined(__CYGWIN32__) || defined(_WIN32) || defined(__EMX__)
if (!fptr->path) return Qnil;
if (chown(fptr->path, o, g) == -1)