1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Add eof? method to NullIO? (#1169)

* Added eof? method to NullIO


See  https://github.com/rack/rack/blob/master/lib/rack/multipart/parser.rb#L68
This commit is contained in:
Charles Brubaker 2016-12-12 11:58:36 -05:00 committed by Nate Berkopec
parent 13434ac998
commit 41c4da6af1
2 changed files with 8 additions and 0 deletions

View file

@ -26,6 +26,10 @@ module Puma
0
end
def eof?
true
end
def sync=(v)
end

View file

@ -9,6 +9,10 @@ class TestNullIO < Minitest::Test
self.nio = Puma::NullIO.new
end
def test_eof_returns_true
assert nio.eof?
end
def test_gets_returns_nil
assert_nil nio.gets
end