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

Initialize the monitor for new subarrays on Rubinius #665

Merged
merged 1 commit into from Jul 23, 2017

Commits on Jul 3, 2017

  1. Initialize the monitor for new subarrays on Rubinius

    Rubinius uses the public methods `new_range` and `new_reserved` to
    create new sub-arrays in methods like `Array#slice`, `Array#[](range)`
    or similar.
    
    Here, Rubinius does not call `Array.allocate` to create the new object
    resulting in the monitor not being initialized which then causes errors
    like
    
        NoMethodError: undefined method `synchronize' on nil:NilClass.
    
    when calling any methods of the new sub-array. By overwriting the two
    methods and explicitly initializing the monitor there, we can ensure
    that the monitor is always initialized correctly.
    meineerde committed Jul 3, 2017
    Copy the full SHA
    91170af View commit details
    Browse the repository at this point in the history