Skip to content
Browse files

Partial fix for JRUBY-2095

git-svn-id: http://svn.codehaus.org/jruby/trunk/jruby@5917 961051c9-f516-0410-bf72-c9f7e237a7b7
  • Loading branch information...
1 parent 99f6a7d commit 70ea1448544433d46c0ff4d9993fd7137c6f2f2b @olabini olabini committed
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/org/jruby/util/JavaNameMangler.java
View
9 src/org/jruby/util/JavaNameMangler.java
@@ -17,7 +17,14 @@
public static String mangleFilenameForClasspath(String filename) {
try {
- String classPath = new JRubyFile(filename).getCanonicalPath().toString();
+ String classPath = "";
+ if(filename.indexOf("!") != -1) {
+ String before = filename.substring(6, filename.indexOf("!"));
+ classPath = new JRubyFile(before + filename.substring(filename.indexOf("!")+1)).getCanonicalPath().toString();
+ } else {
+ classPath = new JRubyFile(filename).getCanonicalPath().toString();
+ }
+
String[] pathElements = PATH_SPLIT.split(classPath);
StringBuffer newPath = new StringBuffer("ruby");

0 comments on commit 70ea144

Please sign in to comment.
Something went wrong with that request. Please try again.