Skip to content

Commit

Permalink
Update shared specs for Process.fork/Kernel.fork/Kernel#fork
Browse files Browse the repository at this point in the history
A number of tests called `Process.fork`, so the specs for Kernel were
mostly calling the wrong method.
  • Loading branch information
herwinw authored and eregon committed Nov 9, 2024
1 parent bbcd077 commit 4770b42
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions shared/process/fork.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@
end

it "returns status zero" do
pid = Process.fork { exit! 0 }
pid = @object.fork { exit! 0 }
_, result = Process.wait2(pid)
result.exitstatus.should == 0
end

it "returns status zero" do
pid = Process.fork { exit 0 }
pid = @object.fork { exit 0 }
_, result = Process.wait2(pid)
result.exitstatus.should == 0
end

it "returns status zero" do
pid = Process.fork {}
pid = @object.fork {}
_, result = Process.wait2(pid)
result.exitstatus.should == 0
end

it "returns status non-zero" do
pid = Process.fork { exit! 42 }
pid = @object.fork { exit! 42 }
_, result = Process.wait2(pid)
result.exitstatus.should == 42
end

it "returns status non-zero" do
pid = Process.fork { exit 42 }
pid = @object.fork { exit 42 }
_, result = Process.wait2(pid)
result.exitstatus.should == 42
end
Expand Down

0 comments on commit 4770b42

Please sign in to comment.