Skip to content

Conversation

@dearblue
Copy link
Contributor

No description provided.

@dearblue dearblue requested a review from matz as a code owner August 25, 2024 11:50
@github-actions github-actions bot added the core label Aug 25, 2024
@matz
Copy link
Member

matz commented Aug 28, 2024

I cared about the nesting of each_object. Do you think it's OK?

@dearblue
Copy link
Contributor Author

Thank you for your review.

I have simulated it in my head again and I believe it is fine.
To enter an if block, it is limited to mrb->gc.iterating == TRUE.
To enter an else block, mrb->gc.iterating = TRUE is set and mrb->gc.iterating = FALSE is set when returning from mrb_objspace_each_objects().
My conclusion is that there is no need to remember the previous state by the iterating variable.

I also checked the issue in #3616, which was the impetus for the change to the current form, but could not reproduce the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants