You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by to...@apache.org on 2010/03/18 18:11:46 UTC

svn commit: r924899 - /buildr/trunk/lib/buildr/java/tests.rb

Author: toulmean
Date: Thu Mar 18 17:11:46 2010
New Revision: 924899

URL: http://svn.apache.org/viewvc?rev=924899&view=rev
Log:
making sure we use a to_s representation of the version. When using short versions like 4.5, Ruby tends to assume we are discussing about a float object, and the method [] is not supporting two parameters

Modified:
    buildr/trunk/lib/buildr/java/tests.rb

Modified: buildr/trunk/lib/buildr/java/tests.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/tests.rb?rev=924899&r1=924898&r2=924899&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/java/tests.rb (original)
+++ buildr/trunk/lib/buildr/java/tests.rb Thu Mar 18 17:11:46 2010
@@ -107,7 +107,7 @@ module Buildr
 
         @dependencies ||= ["#{group}:jmock:jar:#{version}"]
         if two_or_later
-          @dependencies << "org.jmock:jmock-junit#{Buildr::JUnit.version[0,1]}:jar:#{version}"
+          @dependencies << "org.jmock:jmock-junit#{Buildr::JUnit.version.to_s[0,1]}:jar:#{version}"
           @dependencies << "org.hamcrest:hamcrest-core:jar:1.1"
           @dependencies << "org.hamcrest:hamcrest-library:jar:1.1"
         end