Make test/ruby/test_env.rb#test_delete_if_in_ractor easier to debug
authorJean Boussier <[email protected]>
Thu, 8 May 2025 07:11:09 +0000 (8 09:11 +0200)
committerJean Boussier <[email protected]>
Thu, 8 May 2025 07:50:45 +0000 (8 09:50 +0200)
test/ruby/test_env.rb

index c9ec920..c5e3e35 100644 (file)
@@ -914,11 +914,11 @@ class TestEnv < Test::Unit::TestCase
         h2 = {}
         ENV.each_pair {|k, v| h2[k] = v }
         Ractor.yield [h1, h2]
-        Ractor.yield (ENV.delete_if {|k, v| #{ignore_case_str} ? k.upcase == "TEST" : k == "test" }).object_id
+        Ractor.yield (ENV.delete_if {|k, v| #{ignore_case_str} ? k.upcase == "TEST" : k == "test" })
       end
       h1, h2 = r.take
       assert_equal(h1, h2)
-      assert_equal(ENV.object_id, r.take)
+      assert_same(ENV, r.take)
     end;
   end
 
@@ -968,11 +968,11 @@ class TestEnv < Test::Unit::TestCase
         h2 = {}
         ENV.each_pair {|k, v| h2[k] = v }
         Ractor.yield [h1, h2]
-        Ractor.yield (ENV.keep_if {|k, v| #{ignore_case_str} ? k.upcase != "TEST" : k != "test" }).object_id
+        Ractor.yield (ENV.keep_if {|k, v| #{ignore_case_str} ? k.upcase != "TEST" : k != "test" })
       end
       h1, h2 = r.take
       assert_equal(h1, h2)
-      assert_equal(ENV.object_id, r.take)
+      assert_equal(ENV, r.take)
     end;
   end