Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

better jruby.home detection on IBM WAS

Signed-off-by: Hiro Asari <asari.ruby@gmail.com>
  • Loading branch information...
commit bec227e1034c2ffab41034bff06b49ff805a15b5 1 parent 43e91dd
@kares kares authored BanzaiMan committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/org/jruby/embed/util/SystemPropertyCatcher.java
View
6 src/org/jruby/embed/util/SystemPropertyCatcher.java
@@ -209,7 +209,11 @@ public static String findJRubyHome(Object instance) {
public static String findFromJar(Object instance) {
URL resource = instance.getClass().getResource("/META-INF/jruby.home");
if (resource == null) {
- return null;
+ // on IBM WebSphere getResource for a dir returns null but an actual
+ // file if it's there returns e.g. wsjar:file:/opt/IBM/WebSphere/...
+ // .../jruby-stdlib-1.6.7.dev.jar!/META-INF/jruby.home/bin/jrubyc
+ resource = instance.getClass().getResource("/META-INF/jruby.home/bin/jrubyc");
+ if (resource == null) return null;
}
String location = null;
Please sign in to comment.
Something went wrong with that request. Please try again.