diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-06-14 17:50:31 -0700 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-06-25 15:56:20 +0900 |
commit | d118c84b0b9110462e479487ffaf175a75e5718e (patch) | |
tree | f9e9cb34fe7429efc8cb17318d480bbf63dff649 /test/scanf/test_scanfio.rb | |
parent | e572ff2f953b774c372e31894f7bf9e86b3ea6fa (diff) |
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
Diffstat (limited to 'test/scanf/test_scanfio.rb')
-rw-r--r-- | test/scanf/test_scanfio.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/scanf/test_scanfio.rb b/test/scanf/test_scanfio.rb index cec8750aef..f7c439276d 100644 --- a/test/scanf/test_scanfio.rb +++ b/test/scanf/test_scanfio.rb @@ -17,5 +17,12 @@ class TestScanfIO < Test::Unit::TestCase ensure fh.close end + + def test_pipe_scanf + r, w = IO.pipe + w.write('a') + w.close + assert_equal([], r.scanf('a')) + end end |