diff --git a/lib/puma/null_io.rb b/lib/puma/null_io.rb index 70f8fe38a1..ba70cfe908 100644 --- a/lib/puma/null_io.rb +++ b/lib/puma/null_io.rb @@ -53,8 +53,9 @@ def flush self end + # This is used as singleton class, so can't have state. def closed? - true + false end end end diff --git a/test/test_null_io.rb b/test/test_null_io.rb index c76183a130..5bcc89f4ec 100644 --- a/test/test_null_io.rb +++ b/test/test_null_io.rb @@ -65,7 +65,7 @@ def test_flush_returns_self assert_equal nio, nio.flush end - def test_closed_returns_true - assert_equal true, nio.closed? + def test_closed_returns_false + assert_equal false, nio.closed? end end