Skip to content

Commit

Permalink
Fix TestLoad#test_symlinked_jar
Browse files Browse the repository at this point in the history
Introduced in #5121.
Ruby 2.5 loads now the real path of symlinked libraries.
We will now use the file extension of the symlink
to decide what ResourceLibrary to load.

Signed-off-by: Charles Oliver Nutter <headius@headius.com>
  • Loading branch information
ChrisBr authored and headius committed Apr 24, 2018
1 parent b94849a commit 4b347a4
Showing 1 changed file with 3 additions and 4 deletions.
Expand Up @@ -170,12 +170,11 @@ private FoundLibrary findFileResourceWithLoadPath(String searchName, String suff
if (resource.absolutePath() != resource.canonicalPath()) {
FileResource expandedResource = JRubyFile.createResourceAsFile(runtime, resource.canonicalPath());
if (expandedResource.exists()){
resource = expandedResource;
String scriptName = resolveScriptName(resource, resource.canonicalPath());
String loadName = resolveLoadName(resource, searchName + suffix);
String scriptName = resolveScriptName(expandedResource, expandedResource.canonicalPath());
String loadName = resolveLoadName(expandedResource, searchName + suffix);
return new FoundLibrary(ResourceLibrary.create(searchName, scriptName, resource), loadName);
}
}
}
DebugLog.Resource.logFound(pathWithSuffix);
String scriptName = resolveScriptName(resource, pathWithSuffix);
String loadName = resolveLoadName(resource, searchName + suffix);
Expand Down

0 comments on commit 4b347a4

Please sign in to comment.