[前][次][番号順一覧][スレッド一覧]

ruby-changes:70956

From: Nobuyoshi <ko1@a...>
Date: Wed, 19 Jan 2022 21:54:20 +0900 (JST)
Subject: [ruby-changes:70956] 5c7af72304 (master): Assuming EXIT_SUCCESS equals 0 is not portable

https://git.ruby-lang.org/ruby.git/commit/?id=5c7af72304

From 5c7af72304d0ad33cd3f21b24a4bc44e8acd5b2c Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 19 Jan 2022 14:14:02 +0900
Subject: Assuming EXIT_SUCCESS equals 0 is not portable

---
 test/ruby/test_fiber.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb
index 83717651eae..1447a036c3b 100644
--- a/test/ruby/test_fiber.rb
+++ b/test/ruby/test_fiber.rb
@@ -396,7 +396,7 @@ class TestFiber < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_fiber.rb#L396
                 Fiber.new {}.transfer
                 Fiber.new { Fiber.yield }
               end
-              exit!(0)
+              exit!(true)
             end
           }.transfer
           _, status = Process.waitpid2(xpid)
@@ -405,8 +405,8 @@ class TestFiber < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_fiber.rb#L405
       end.resume
     end
     pid, status = Process.waitpid2(pid)
-    assert_equal(0, status.exitstatus, bug5700)
-    assert_equal(false, status.signaled?, bug5700)
+    assert_not_predicate(status, :signaled?, bug5700)
+    assert_predicate(status, :success?, bug5700)
   end
 
   def test_exit_in_fiber
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]