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 Map#each and #each_pair not returning enumerator outside of MRI #644

Merged
merged 2 commits into from Apr 2, 2017
Merged

Fix Map#each and #each_pair not returning enumerator outside of MRI #644

merged 2 commits into from Apr 2, 2017

Commits on Mar 29, 2017

  1. Fix failing testcase when using SynchronizedMapBackend

    The SynchronizedMapBackend, by definition, uses a lock around every
    operation, and thus could never pass a test that checks that updates
    and reads can happen concurrently.
    ivoanjo committed Mar 29, 2017
    Copy the full SHA
    b0e2216 View commit details
    Browse the repository at this point in the history
  2. Fix Map#each and #each_pair not returning enumerator outside of MRI

    When no block was passed to Map#each_pair or its alias Map#each, the
    NonConcurrentMapBackend would return an enumerator, which would allow
    enumerable methods to be used on a Map.
    
    But the alternate Map backends, JRubyMapBackend and
    AtomicReferenceMapBackend did not implement the same logic.
    
    As a fix, let's move the logic down to the shared Map class, so all
    implementations can use it.
    
    Fixes #643
    ivoanjo committed Mar 29, 2017
    Copy the full SHA
    0bdc3c0 View commit details
    Browse the repository at this point in the history