Skip to content

Commit b975c7a

Browse files
committedMar 19, 2018
Add two-arg version of Dir.children. #4876.
Encoding is ignored currently due to a lack of encoding support in the Dir.entries logic. This change is to allow find.rb to work without argument errors.
1 parent 4cf9456 commit b975c7a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

Diff for: ‎core/src/main/java/org/jruby/RubyDir.java

+6
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,12 @@ public static RubyArray children(ThreadContext context, IRubyObject recv, IRubyO
371371
return entries;
372372
}
373373

374+
@JRubyMethod(name = "children", meta = true)
375+
public static RubyArray children(ThreadContext context, IRubyObject recv, IRubyObject arg, IRubyObject encoding) {
376+
// TODO: encoding unused due to lack of encoding support in entries
377+
return children(context, recv, arg);
378+
}
379+
374380
/**
375381
* Deletes the directory specified by <code>path</code>. The directory must
376382
* be empty.

0 commit comments

Comments
 (0)
Please sign in to comment.