Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Ractor.make_shareable changing locals for Procs #4940

Merged
merged 1 commit into from
Oct 6, 2021

Commits on Oct 6, 2021

  1. Fix Ractor.make_shareable changing locals for Procs

    env_copy() uses rb_ary_delete_at() with a loop counting up while
    iterating through the list of read only locals. rb_ary_delete_at() can
    shift elements in the array to an index lesser than the loop index,
    causing locals to be missed and being set to Qfalse in the returned
    environment.
    
    Iterate through the list of locals in reverse instead, this way we
    always remove the last element and not cause elements in the array to
    shift. This ensures that all read only locals are handled.
    
    [Bug #18023]
    XrXr committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    eb0c33d View commit details
    Browse the repository at this point in the history