aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
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 f188f74c11..52e71f3df2 100644
--- a/io.c
+++ b/io.c
@@ -1197,8 +1197,8 @@ io_read(argc, argv, io)
}
if (len == 0) return str;
- READ_CHECK(fptr->f);
FL_SET(str, FL_FREEZE);
+ READ_CHECK(fptr->f);
n = rb_io_fread(RSTRING(str)->ptr, len, fptr->f);
FL_UNSET(str, FL_FREEZE);
if (n == 0) {