summaryrefslogtreecommitdiff
path: root/test/fiber/test_io_buffer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/fiber/test_io_buffer.rb')
-rw-r--r--test/fiber/test_io_buffer.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/fiber/test_io_buffer.rb b/test/fiber/test_io_buffer.rb
index a08b1ce1a9..19e6c1f88e 100644
--- a/test/fiber/test_io_buffer.rb
+++ b/test/fiber/test_io_buffer.rb
@@ -21,7 +21,8 @@ class TestFiberIOBuffer < Test::Unit::TestCase
Fiber.set_scheduler scheduler
Fiber.schedule do
- message = i.read(20)
+ # We add 1 here, to force the read to block (testing that specific code path).
+ message = i.read(MESSAGE.bytesize + 1)
i.close
end