Skip to content

Commit

Permalink
Windows guard
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Nov 7, 2022
1 parent 9bc2ae2 commit 740ccc8
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions core/process/spawn_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -567,12 +567,14 @@ def child_pids(pid)
end
end

it "redirects non-default file descriptor to itself" do
File.open(@name, 'w') do |file|
-> do
Process.wait Process.spawn(
ruby_cmd("f = IO.new(#{file.fileno}, 'w'); f.print(:bang); f.flush"), file.fileno => file.fileno)
end.should output_to_fd("bang", file)
platform_is_not :windows do
it "redirects non-default file descriptor to itself" do
File.open(@name, 'w') do |file|
-> do
Process.wait Process.spawn(
ruby_cmd("f = IO.new(#{file.fileno}, 'w'); f.print(:bang); f.flush"), file.fileno => file.fileno)
end.should output_to_fd("bang", file)
end
end
end

Expand Down

0 comments on commit 740ccc8

Please sign in to comment.