Author: donaldp
Date: Sat Oct 20 11:41:45 2012
New Revision: 1400422
URL: http://svn.apache.org/viewvc?rev=1400422&view=rev
Log:
Fix the matching of strings on windows to use regex
Modified:
buildr/trunk/lib/buildr/java/commands.rb
Modified: buildr/trunk/lib/buildr/java/commands.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/commands.rb?rev=1400422&r1=1400421&r2=1400422&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/java/commands.rb (original)
+++ buildr/trunk/lib/buildr/java/commands.rb Sat Oct 20 11:41:45 2012
@@ -62,7 +62,7 @@ module Java
# If our cmd line is longer, we create a batch file and execute it
instead.
if Util.win_os? && cmd_args.map(&:inspect).join(' ').size > 2048
# remove '-classpath' and the classpath itself from the cmd line.
- cp_i = cmd_args.index{|x| x.starts_with('-classpath')}
+ cp_i = cmd_args.index{|x| x.to_s =~ /^-classpath/}
2.times do
cmd_args.delete_at cp_i unless cp_i.nil?
end