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 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 14, 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
Copy link
Member

headius commented Aug 18, 2019

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

Copy link
Member

@headius 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants