summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--io.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e86ad13be..7ad144ef7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Dec 2 07:57:16 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * io.c (rb_io_ctl): [ruby-dev:25019]
+
Wed Dec 1 06:13:00 2004 NARUSE, Yui <naruse@ruby-lang.org>
* ext/nkf/nkf.c: add constant NKF::VERSION
diff --git a/io.c b/io.c
index 1eb9fdf68..eae5f9dde 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) {