puma icon indicating copy to clipboard operation
puma copied to clipboard

null_io.rb - add set_encoding, similar to IO#set_encoding

Open MSP-Greg opened this issue 2 years ago • 1 comments

Description

See https://github.com/rack/rack/pull/2115, which identifies a bug that occurs with Rack::MockRequest.env_for.

See also Rack Spec: The Input Stream.

More IO instance methods may need to be added to Puma::NullIO.

Your checklist for this pull request

  • [x] I have reviewed the guidelines for contributing to this repository.
  • [x] I have added (or updated) appropriate tests if this PR fixes a bug or adds a feature.
  • [x] My pull request is 100 lines added/removed or less so that it can be easily reviewed.
  • [ ] If this PR doesn't need tests (docs change), I added [ci skip] to the title of the PR.
  • [ ] If this closes any issues, I have added "Closes #issue" to the PR description or my commit messages.
  • [ ] I have updated the documentation accordingly.
  • [x] All new and existing tests passed, including Rubocop.

MSP-Greg avatar Aug 27 '23 18:08 MSP-Greg

@nateberkopec Thanks.

The current PR adds set_encoding, I think adding external_encoding and internal_encoding would also be a good idea. I'll update soon...

MSP-Greg avatar Aug 30 '23 20:08 MSP-Greg