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

enumerator review for better compatibility #5834

Merged
merged 26 commits into from Aug 19, 2019
Merged

Conversation

@kares
Copy link
Member

kares commented Aug 14, 2019

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.rb introduced 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 Enumerator code 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)

kares added 26 commits Aug 5, 2019
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!
@headius

This comment has been minimized.

Copy link
Member

headius commented Aug 18, 2019

Wow, lots of commits. I'll have a look.

Copy link
Member

headius left a comment

Looks good to me!

@kares kares added this to the JRuby 9.2.9.0 milestone Aug 19, 2019
@kares kares merged commit 182d624 into jruby:master Aug 19, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jruby.jruby Build #20190814.6 succeeded
Details
@kares kares mentioned this pull request Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.