Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullIO#closed? should return false #2883

Merged
merged 1 commit into from Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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