-
Notifications
You must be signed in to change notification settings - Fork 41
IO.select not coercing arguments #379
Comments
Right now IO.select is probably relying on a Smalltalk select primitive On Thu, Mar 19, 2015 at 8:55 PM, Michael [email protected] wrote:
|
IIRC, Kernel#select is in pure Ruby and delegates to a Smalltalk method after treating arguments. It should be easy to call to_io there. ----- Ursprüngliche Nachricht ----- Right now IO.select is probably relying on a Smalltalk select primitive On Thu, Mar 19, 2015 at 8:55 PM, Michael [email protected] wrote:
— |
in MRI the
IO.select
says that is accepts anyIO
objects, but it actually enforces that via ducktyping rather than checking the type directly. In other wordsIO.select
in MRI callsto_io
on its arguments rather than checking their type directly.Here is a little test script that shows the behavior:
Under ruby-2.2.0 this script runs correctly and outputs:
Under maglev-head this script raises the following error:
The text was updated successfully, but these errors were encountered: