summaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-07 05:54:28 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-07 05:54:28 +0000
commit04a89cb60b021fc36aae60552ce0e9f2bf963a6e (patch)
tree75d9fe12b45dad0982c78f94bcfb8bed44115ea6 /io.c
parent1294ea9a9b2a07451f0474bb3b7a20d9210286da (diff)
downloadruby-04a89cb60b021fc36aae60552ce0e9f2bf963a6e.tar.gz
ruby-04a89cb60b021fc36aae60552ce0e9f2bf963a6e.tar.xz
ruby-04a89cb60b021fc36aae60552ce0e9f2bf963a6e.zip
* io.c (io_read): should freeze buffer before thread context
switch. [ruby-dev:24442] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7011 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 ffff98f9e..186fabfd0 100644
--- a/io.c
+++ b/io.c
@@ -1070,8 +1070,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) {