Skip to content

Commit

Permalink
NullIO#closed should return false (puma#2883)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSP-Greg authored and JuanitoFatas committed Sep 9, 2022
1 parent 1835f5d commit a250125
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/puma/null_io.rb
Expand Up @@ -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
4 changes: 2 additions & 2 deletions test/test_null_io.rb
Expand Up @@ -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

0 comments on commit a250125

Please sign in to comment.