File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ edge_gemspec = Gem::Specification.load File.join(__dir__, 'concurrent-ruby-edge.
1818
1919require 'rake/javaextensiontask'
2020
21- JRUBY_JAR_PATH = '/usr/local/opt/rbenv/versions/jruby-9.1.17.0/lib/jruby.jar'
22-
2321class ConcurrentRubyJavaExtensionTask < Rake ::JavaExtensionTask
2422 def java_classpath_arg ( *args )
2523 jruby_cpath = nil
@@ -42,10 +40,15 @@ class ConcurrentRubyJavaExtensionTask < Rake::JavaExtensionTask
4240 end
4341
4442 unless jruby_cpath
45- jruby_cpath = JRUBY_JAR_PATH
46- raise "#{ jruby_cpath } does not exist" unless File . exist? jruby_cpath
43+ jruby_home = ENV [ 'JRUBY_HOME' ]
44+ if jruby_home
45+ candidate = File . join ( jruby_home , 'lib' , 'jruby.jar' )
46+ jruby_cpath = candidate if File . exist? candidate
47+ end
4748 end
4849
50+ raise "jruby.jar path not found" unless jruby_cpath
51+
4952 jruby_cpath += File ::PATH_SEPARATOR + args . join ( File ::PATH_SEPARATOR ) unless args . empty?
5053 jruby_cpath ? "-cp \" #{ jruby_cpath } \" " : ""
5154 end
You can’t perform that action at this time.
0 commit comments