Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: be3bd1703238
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 107dfbf31296
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Mar 25, 2018

  1. Require real path

    expand load paths to real paths to get rid of duplicate loading from
    symbolic-linked directories. [Feature #10222]
    ruby/ruby@b6d3927
    ChrisBr committed Mar 25, 2018

    Verified

    This commit was signed with the committer’s verified signature.
    headius Charles Oliver Nutter
    Copy the full SHA
    860229a View commit details

Commits on Mar 27, 2018

  1. Merge pull request #5109 from ChrisBr/bug/fix_require_symlink

    Require real path
    headius authored Mar 27, 2018
    Copy the full SHA
    107dfbf View commit details
Showing with 10 additions and 0 deletions.
  1. +10 −0 core/src/main/java/org/jruby/runtime/load/LibrarySearcher.java
10 changes: 10 additions & 0 deletions core/src/main/java/org/jruby/runtime/load/LibrarySearcher.java
Original file line number Diff line number Diff line change
@@ -167,6 +167,16 @@ private FoundLibrary findFileResourceWithLoadPath(String searchName, String suff
DebugLog.Resource.logTry(pathWithSuffix);
FileResource resource = JRubyFile.createResourceAsFile(runtime, pathWithSuffix);
if (resource.exists()) {
if (resource.absolutePath() != resource.canonicalPath()) {
FileResource realResource = JRubyFile.createResourceAsFile(runtime, resource.canonicalPath());
if (realResource.exists()){
resource = realResource;
String scriptName = resolveScriptName(resource, resource.canonicalPath());
String loadName = resolveLoadName(resource, 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);