buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From as...@apache.org
Subject svn commit: r821642 - /buildr/trunk/lib/buildr/core/util.rb
Date Sun, 04 Oct 2009 23:52:41 GMT
Author: assaf
Date: Sun Oct  4 23:52:40 2009
New Revision: 821642

URL: http://svn.apache.org/viewvc?rev=821642&view=rev
Log:
Iterator hack fixed to work on both JRuby 1.3.1 and RJB on OS X.

Modified:
    buildr/trunk/lib/buildr/core/util.rb

Modified: buildr/trunk/lib/buildr/core/util.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/util.rb?rev=821642&r1=821641&r2=821642&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/util.rb (original)
+++ buildr/trunk/lib/buildr/core/util.rb Sun Oct  4 23:52:40 2009
@@ -260,7 +260,9 @@
         # and the Hash doesn't work the way we need it to.  Unfortunately, we can call toString
on MRI's object,
         # but not on the JRuby one; calling to_s on the JRuby object returns what we need,
but ... you guessed it.
         #  So this seems like the one hack to unite them both.
-        key = Java.java.lang.String.valueOf(keys.next)
+        #key = Java.java.lang.String.valueOf(keys.next.to_s)
+        key = keys.next
+        key = key.toString unless String === key
         hash[key] = java_properties.getProperty(key)
       end
       hash



Mime
View raw message