Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -123,7 +123,8 @@ private static RubyArray glob(final RubyContext context, String glob) {

final String prefix = absoluteGlob.substring(0, prefixLength - 1);

final PathMatcher matcher = FileSystems.getDefault().getPathMatcher("glob:" + absoluteGlob.substring(prefixLength));
// Glob patterns must always use '/', even on Windows.
final PathMatcher matcher = FileSystems.getDefault().getPathMatcher("glob:" + absoluteGlob.substring(prefixLength).replace('\\', '/'));

final RubyArray array = new RubyArray(context.getCoreLibrary().getArrayClass());

0 comments on commit fb9199f

Please sign in to comment.