summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-08-26 14:18:58 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-08-26 14:18:58 +0000
commit662a3ca8064d973a4f96184d2598741b6ee3c7ae (patch)
tree5f9c568001929d5e08e17a5a0239b2dec6632725 /lib
parentd65f94634cf52f6821e0c1c0911b88845b71d502 (diff)
merge revision(s) d118c84b0b9110462e479487ffaf175a75e5718e: [Backport #15199]
Fix IO#scanf on pipes on Windows IO.seek on a pipe on Windows raises Errno::EINVAL instead of Errno::ESPIPE. Fixes Ruby Bug #15199 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@67754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/scanf.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/scanf.rb b/lib/scanf.rb
index 6bd7da4043..27e815d494 100644
--- a/lib/scanf.rb
+++ b/lib/scanf.rb
@@ -660,7 +660,7 @@ class IO
begin
seek(start_position + matched_so_far, IO::SEEK_SET)
- rescue Errno::ESPIPE
+ rescue Errno::ESPIPE, Errno::EINVAL
end
soak_up_spaces if fstr.last_spec && fstr.space