Skip to content
Permalink
Browse files
for URLResource do not try to find directory for certain pathnames
all the pathnames ending in ".rb", ".class", ".jar" assume they are
files and do no lookup directory info.
  • Loading branch information
mkristian committed Dec 1, 2014
1 parent a65a63c commit 22331c2ee3aa5b89fa137925d37a30af62d6a97d
Showing with 6 additions and 0 deletions.
  1. +6 −0 core/src/main/java/org/jruby/util/URLResource.java
@@ -252,6 +252,9 @@ private static String[] listFilesFromInputStream(InputStream is) {
}
}
private static String[] listClassLoaderFiles(String pathname) {
if (pathname.endsWith(".rb") || pathname.endsWith(".class") || pathname.endsWith(".jar")) {
return null;
}
try
{
Enumeration<URL> urls = Thread.currentThread().getContextClassLoader().getResources(pathname + "/.jrubydir");
@@ -276,6 +279,9 @@ private static String[] listClassLoaderFiles(String pathname) {
}

private static String[] listFiles(String pathname) {
if (pathname.endsWith(".rb") || pathname.endsWith(".class") || pathname.endsWith(".jar")) {
return null;
}
try
{
// TODO remove this replace

0 comments on commit 22331c2

Please sign in to comment.