Skip to content

Commit

Permalink
null_io.rb - add set_encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
MSP-Greg committed Aug 27, 2023
1 parent c2f7330 commit 7a3853b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/puma/null_io.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,9 @@ def flush
def closed?
false
end

def set_encoding(enc)
self
end
end
end
4 changes: 4 additions & 0 deletions test/test_null_io.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,8 @@ def test_flush_returns_self
def test_closed_returns_false
assert_equal false, nio.closed?
end

def test_set_encoding
assert_equal nio, nio.set_encoding(Encoding::BINARY)
end
end

0 comments on commit 7a3853b

Please sign in to comment.