Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
wants to merge 1 commit into from

2 participants

@minoritea

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.

@raggi
Owner

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

@raggi
Owner

(i do like the idea)

@raggi raggi added this to the Rack 1.6 milestone
@raggi
Owner

Happy to add to 1.6 if moved to optional.

@raggi
Owner

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
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/rack/lint.rb
View
2  lib/rack/lint.rb
@@ -432,7 +432,7 @@ class HijackWrapper
REQUIRED_METHODS = [
: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.