Actions
Bug #15199
closedscanf.rb broken with io from IO.pipe (MinGW or Windows?)
Description
scanf.rb seems to be broken when using an io from a pipe.
The following code is used in IO#scanf:
link: https://github.com/ruby/ruby/blob/d4b0efc010a45e904ecdad2dd74374b5c74e61e3/lib/scanf.rb#L661-L664
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...
Actions
Like0
Like0Like0Like0Like0Like0Like0