Created
November 9, 2015 23:43
-
-
Save mkristian/db06735f737cefd808d2 to your computer and use it in GitHub Desktop.
treat windows drive letters as protocol with absolute paths
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/src/main/java/org/jruby/RubyFile.java b/core/src/main/java/org/jruby/RubyFile.java | |
index 3bfc0b7..89658f1 100644 | |
--- a/core/src/main/java/org/jruby/RubyFile.java | |
+++ b/core/src/main/java/org/jruby/RubyFile.java | |
@@ -482,7 +482,7 @@ public class RubyFile extends RubyIO implements EncodingCapable { | |
return getRuntime().newString(val.toString()); | |
} | |
- private static String URI_PREFIX_STRING = "^(uri|jar|file|classpath):([^:/]+:([^:/]+:)?)?"; | |
+ private static String URI_PREFIX_STRING = "^([a-z]|uri|jar|file|classpath):([^:/]+:([^:/]+:)?)?"; | |
private static Pattern ROOT_PATTERN = Pattern.compile(URI_PREFIX_STRING + "/?/?$"); | |
/* File class methods */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment