Skip to content


add delegate of to_io method for native function like rb_io_get_io. #594

wants to merge 1 commit into from

2 participants


When I passed HijackWrapper instances to IO::select, it raises TypeError because this method calls rb_io_get_io, a native function, only accepts IO instances.
Add "to_io" method for converting the wrappers to IO instances automatically.

Official Rack repositories member

This is a major spec change as it's a required specification, needs to be delayed for a major release, or specified as optional.

Official Rack repositories member

(i do like the idea)

@raggi raggi added this to the Rack 1.6 milestone
Official Rack repositories member

Happy to add to 1.6 if moved to optional.

Official Rack repositories member

Closing waiting for response to review.

@raggi raggi closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 20, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rack/lint.rb
2 lib/rack/lint.rb
@@ -432,7 +432,7 @@ class HijackWrapper
:read, :write, :read_nonblock, :write_nonblock, :flush, :close,
- :close_read, :close_write, :closed?
+ :close_read, :close_write, :closed?, :to_io
def_delegators :@io, *REQUIRED_METHODS
Something went wrong with that request. Please try again.