Skip to content

Commit 740ccc8

Browse files
committed
Windows guard
1 parent 9bc2ae2 commit 740ccc8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

core/process/spawn_spec.rb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -567,12 +567,14 @@ def child_pids(pid)
567567
end
568568
end
569569

570-
it "redirects non-default file descriptor to itself" do
571-
File.open(@name, 'w') do |file|
572-
-> do
573-
Process.wait Process.spawn(
574-
ruby_cmd("f = IO.new(#{file.fileno}, 'w'); f.print(:bang); f.flush"), file.fileno => file.fileno)
575-
end.should output_to_fd("bang", file)
570+
platform_is_not :windows do
571+
it "redirects non-default file descriptor to itself" do
572+
File.open(@name, 'w') do |file|
573+
-> do
574+
Process.wait Process.spawn(
575+
ruby_cmd("f = IO.new(#{file.fileno}, 'w'); f.print(:bang); f.flush"), file.fileno => file.fileno)
576+
end.should output_to_fd("bang", file)
577+
end
576578
end
577579
end
578580

0 commit comments

Comments
 (0)