enumerator review for better compatibility#5834
Merged
kares merged 26 commits intojruby:masterfrom Aug 19, 2019
Merged
Conversation
in enumerator.rb library
since JRuby uses that API (for internal LAZY_WITH_NO_BLOCK)
to be able to handle all required cases e.g. pass block size
otherwise we're leaking using fibers (see 6c232ab) with support for `enum.feed(value)` which causes a bit of (enumerator's __call__ internal) duplication
when alias-ing a method this wasn't accurate
... as otherwise arg handling would cause regressions
otherwise the ONE_REQUIRED caused the logic to unwrap [1] showed up with ironed out args processing in Enumerator!
Member
|
Wow, lots of commits. I'll have a look. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this work builts upon #5672, which introduced the enumerator.rb library used by Rubinius ...
here, we're now adjusting parts for better compatibility with MRI's implementation.
just a note that the
enumerator.rbintroduced wasn't a drop in replacement and (already) required modifications on JRuby's end (Fiber state sharing) to make it usable. the gist of the lib stays the same.changes are motivated by getting compatibility improved - 50 passing specs, 11 untagged MRI tests
also, due some
Enumeratorcode being triggered during boot by RGs - we rather avoid reflecting on JRuby's internal classes (hasn't triggered the parts with JI loading but still)