scanf.rb broken with io from IO.pipe (MinGW or Windows?)
scanf.rb seems to be broken when using an io from a pipe.
The following code is used in IO#scanf:
begin seek(start_position + matched_so_far, IO::SEEK_SET) rescue Errno::ESPIPE end
if the rescue statement is replaced with:
rescue Errno::ESPIPE, Errno::EINVAL
It seems to work. I assume at some point, a 'pipe' io raised an Errno::ESPIPE error when called with #seek, but trunk & 2.3 respond with Errno::EINVAL...
Updated by jeremyevans0 (Jeremy Evans) about 5 hours ago
- Status changed from Open to Closed
Pull request merged: https://github.com/ruby/scanf/commit/50f3b58ea0b56df436025e77669413622d544fbf