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

Implement Dir.each_child #4953

merged 2 commits into from Jan 10, 2018


None yet
2 participants

nomadium commented Jan 8, 2018

Hi folks,

This is another feature targeting Ruby 2.5 [1]: Dir.each_child (feature #11302).

Note: The test is copied from MRI.

Thanks for your review and feedback.

  1. #4876

nomadium added some commits Jan 5, 2018

Implement Dir.each_child
For more information, please see feature #11302.

enebo approved these changes Jan 10, 2018

Just curious about one thing but this look good.

RubyClass dirClass = runtime.getDir();
RubyDir dir = (RubyDir) dirClass.newInstance(context, new IRubyObject[]{_path}, block);
dir.each_child(context, block);

This comment has been minimized.


enebo Jan 10, 2018


Does this path (block passed in) in MRI really ignore encoding param?

This comment has been minimized.


nomadium Jan 10, 2018


Good observation. I'm not really sure about MRI on this, but Dir::foreach JRuby method implementation is currently doing something similar if I'm not mistaken:

I'll get back to this later with my findings.

@enebo enebo merged commit 19a43e1 into jruby:ruby-2.5 Jan 10, 2018

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error

@nomadium nomadium deleted the nomadium:implement-dir-each-child branch Jan 10, 2018

@enebo enebo added this to the JRuby milestone Feb 21, 2018

@enebo enebo modified the milestones: JRuby, JRuby Apr 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment