Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DO NOT MERGE] Add 2.7 Range#minmax monkeypatch
Unfortunately, the 2.7 implementation actually contains a bug which causes the underlying C implementation of Range#max to delegate to Enumerable#minmax instead of Enumerable#max, since the optimized Range#minmax C implementation skips the Ruby call to Range#max, and calls straight into the C function range_max, thereby failing to change the execution context, and causing the incorrect super call. Pending a fix in MRI, Range#minmax is monkeypatched with an equivalent fix, allowing the specs to be worked on. Once the fix is merged upstream, this commit can be reverted to remove the monkeypatch, and the specs should continue to pass.
- Loading branch information