lib/jstdutil.rb in jstdutil-0.3.3 vs lib/jstdutil.rb in jstdutil-0.3.4
- old
+ new
@@ -12,10 +12,11 @@
# Locate Jar file from a given path. Default classpath is $JSTDUTIL_HOME
# Finds and returns the first file matching jstest*.jar (case insensitive).
# Also checks current working directory
#
def self.jar(classpath = ENV["JSTESTDRIVER_HOME"] || Dir.pwd)
- files = Dir.glob(File.join(classpath, 'jstest*.jar'), File::FNM_CASEFOLD)
+ files = Dir.glob(File.expand_path(File.join(classpath, 'jstest*.jar')),
+ File::FNM_CASEFOLD)
files.sort! { |f1, f2| f1.downcase <=> f2.downcase }
if !files || !files.first
msg = "Unable to load jar file from #{classpath}\n" <<
"Check that $JSTESTDRIVER_HOME is set correctly"