summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-02 00:27:27 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-02 00:27:27 +0000
commitaa997fca3e0ebde50ea9121c14eeb5c82d749a53 (patch)
treedf63c0af6a285eff4eb9bd7c9e0a3b89fe743209 /io.c
parentc1b036033b813973a8b175f86ab5585795192573 (diff)
* io.c (rb_io_ctl): [ruby-dev:25019]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 1eb9fdf683..eae5f9ddee 100644
--- a/io.c
+++ b/io.c
@@ -4707,7 +4707,6 @@ rb_io_ctl(io, req, arg, io_p)
int retval;
rb_secure(2);
- GetOpenFile(io, fptr);
if (NIL_P(arg) || arg == Qfalse) {
narg = 0;
@@ -4748,6 +4747,7 @@ rb_io_ctl(io, req, arg, io_p)
narg = (long)RSTRING(arg)->ptr;
}
}
+ GetOpenFile(io, fptr);
retval = io_cntl(fileno(fptr->f), cmd, narg, io_p);
if (retval < 0) rb_sys_fail(fptr->path);
if (TYPE(arg) == T_STRING && RSTRING(arg)->ptr[len] != 17) {