From 26e1ebdc1e3a26edada728000bb25b040d7ff4cc Mon Sep 17 00:00:00 2001 From: normal Date: Sun, 1 Mar 2015 21:03:22 +0000 Subject: io/wait: fix return value for buffered read * ext/io/wait/wait.c (io_nread): wrap return value with INT2FIX Thanks to Yura Sokolov [ruby-core:68369] [Bug#10923] * test/io/wait/test_io_wait.rb (test_nread_buffered): fix broken test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/io/wait/test_io_wait.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/io/wait/test_io_wait.rb') diff --git a/test/io/wait/test_io_wait.rb b/test/io/wait/test_io_wait.rb index 9d883aa821..7729d45526 100644 --- a/test/io/wait/test_io_wait.rb +++ b/test/io/wait/test_io_wait.rb @@ -31,7 +31,7 @@ class TestIOWait < Test::Unit::TestCase def test_nread_buffered @w.syswrite ".\n!" - assert_equal ".\n", @r.read(2) + assert_equal ".\n", @r.gets assert_equal 1, @r.nread end -- cgit v1.2.3