summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index 20c34a70774..9a96e31da09 100644
--- a/gc.c
+++ b/gc.c
@@ -2535,9 +2535,9 @@ rb_objspace_each_objects(int (*callback)(void *vstart, void *vend,
i = 0;
while (i < heaps_used) {
while (0 < i && (uintptr_t)membase < (uintptr_t)objspace->heap.sorted[i-1].slot->membase)
- i--;
+ i--;
while (i < heaps_used && (uintptr_t)objspace->heap.sorted[i].slot->membase <= (uintptr_t)membase )
- i++;
+ i++;
if (heaps_used <= i)
break;
membase = objspace->heap.sorted[i].slot->membase;