diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 83d7fda24b..9fbe321452 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2211,6 +2211,11 @@ End f.pos = pos3 assert_equal(nil, f.gets) } + File.open("tmp.txt") {|f| + f.pos = File.size("tmp.txt") + s = "not empty string " + assert_equal("", f.read(0,s)) + } } end