Skip to content

Conversation

colby-swandale
Copy link
Member

Dir.children is only available on versions of MRI >= 2.5. This is breaking CI and preventing new PRs from being merged. This was caused by d8c665c

This PR fixes the issue by checking if the method exists, otherwise, use the previous way of getting filenames.

lib/fileutils.rb Outdated
Dir.children(path, opts)\
.map {|n| Entry_.new(prefix(), join(rel(), n.untaint)) }

files = begin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to assign from result of if statement directly instead of begin ... end statement.

@colby-swandale
Copy link
Member Author

@hsbt Thank you for the feedback, i've updated the PR.

@hsbt hsbt merged commit 7ca3d62 into ruby:master Jan 6, 2019
matzbot pushed a commit to ruby/ruby that referenced this pull request Mar 27, 2019
  It includes the following updates:

  * ruby/fileutils#26
  * ruby/fileutils#27
  * ruby/fileutils#29
  * ruby/fileutils#34

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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.

2 participants