Skip to content

Commit 4f8ca2f

Browse files
committed
[Truffle] Fixed specs on Windows.
1 parent 1c54123 commit 4f8ca2f

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

spec/truffle/truffle.mspec

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ class MSpecScript
44
ENV.key?('WINDIR') || ENV.key?('windir')
55
end
66

7-
def self.path_separator
8-
# This is going to be used in a regexp, so we need to escape the backslash character in the regexp as well,
9-
# thus the double-escape here.
10-
windows? ? "\\\\" : '/'
11-
end
12-
137
set :target, File.join(File.dirname(__FILE__), "spec-wrapper#{windows? ? '.bat' : ''}")
148

159
set :language, [
@@ -113,9 +107,9 @@ core += [
113107
]
114108

115109
set :tags_patterns, [
116-
[%r(^.*#{path_separator}language#{path_separator}), 'spec/truffle/tags/language/'],
117-
[%r(^.*#{path_separator}core#{path_separator}), 'spec/truffle/tags/core/'],
118-
[%r(^.*#{path_separator}rubysl#{path_separator}), 'spec/truffle/tags/rubysl/'],
110+
[%r(^.*/language/), 'spec/truffle/tags/language/'],
111+
[%r(^.*/core/), 'spec/truffle/tags/core/'],
112+
[%r(^.*/rubysl/), 'spec/truffle/tags/rubysl/'],
119113
[/_spec.rb$/, '_tags.txt']
120114
]
121115

truffle/src/main/java/org/jruby/truffle/nodes/core/DirNodes.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import org.jruby.truffle.runtime.RubyContext;
1818
import org.jruby.truffle.runtime.core.RubyArray;
19+
import org.jruby.truffle.runtime.core.RubyFile;
1920
import org.jruby.truffle.runtime.core.RubyProc;
2021
import org.jruby.truffle.runtime.core.RubyString;
2122

@@ -173,7 +174,7 @@ private static RubyArray glob(final RubyContext context, String glob) {
173174
@Override
174175
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
175176
if (matcher.matches(file)) {
176-
array.slowPush(context.makeString(file.toString()));
177+
array.slowPush(context.makeString(RubyFile.expandPath(context, file.toString())));
177178
}
178179

179180
return FileVisitResult.CONTINUE;

0 commit comments

Comments
 (0)