mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
Use ruby to suppress a warning message by cmd.exe
It is expected that reading from command with offset fails by ESPIPE and the pipe will be closed immediately. While this causes the child process to terminate by SIGPIPE usually, cmd.exe yields the message bellow. ``` The process tried to write to a nonexistent pipe. ```
This commit is contained in:
parent
29500e3034
commit
004c6a6ed1
Notes:
git
2024-08-22 07:33:13 +00:00
@ -2543,7 +2543,7 @@ class TestIO < Test::Unit::TestCase
|
||||
end
|
||||
assert_raise(Errno::ESPIPE) do
|
||||
assert_deprecated_warning(/IO process creation with a leading '\|'/) do # https://bugs.ruby-lang.org/issues/19630
|
||||
IO.read("|echo foo", 1, 1)
|
||||
IO.read("|#{EnvUtil.rubybin} -e 'puts :foo'", 1, 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user