Skip to content

Commit

Permalink
[Truffle] Expand a path in $LOAD_PATH if it is relative.
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Mar 6, 2015
1 parent 034c7cd commit ea53fd6
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -70,7 +70,10 @@ public boolean require(String feature, Node currentNode) throws IOException {
// Try each load path in turn

for (Object pathObject : context.getCoreLibrary().getLoadPath().slowToArray()) {
final String loadPath = pathObject.toString();
String loadPath = pathObject.toString();
if (!isAbsolutePath(loadPath)) {
loadPath = RubyFile.expandPath(context, loadPath);
}

if (requireInPath(loadPath, feature, currentNode)) {
return true;
Expand Down

0 comments on commit ea53fd6

Please sign in to comment.