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

ruby-changes:63466

From: Aaron <ko1@a...>
Date: Thu, 29 Oct 2020 02:17:37 +0900 (JST)
Subject: [ruby-changes:63466] a99f52d511 (master): Remove another unnecessary test

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

From a99f52d5113a601b6d18bd671dfee24266689ffe Mon Sep 17 00:00:00 2001
From: Aaron Patterson <tenderlove@r...>
Date: Wed, 28 Oct 2020 10:16:57 -0700
Subject: Remove another unnecessary test

Same as 5be42c1ef4f7ed0a8004cad750a9ce61869bd768

diff --git a/gc.c b/gc.c
index 58541a4..dd9f091 100644
--- a/gc.c
+++ b/gc.c
@@ -8207,11 +8207,9 @@ gc_ref_update_object(rb_objspace_t * objspace, VALUE v) https://github.com/ruby/ruby/blob/trunk/gc.c#L8207
 {
     VALUE *ptr = ROBJECT_IVPTR(v);
 
-    if (ptr) {
-        uint32_t i, len = ROBJECT_NUMIV(v);
-        for (i = 0; i < len; i++) {
-            UPDATE_IF_MOVED(objspace, ptr[i]);
-        }
+    uint32_t i, len = ROBJECT_NUMIV(v);
+    for (i = 0; i < len; i++) {
+        UPDATE_IF_MOVED(objspace, ptr[i]);
     }
 }
 
-- 
cgit v0.10.2


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

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