buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boisv...@apache.org
Subject svn commit: r920031 - /buildr/trunk/lib/buildr/core/environment.rb
Date Sun, 07 Mar 2010 16:53:17 GMT
Author: boisvert
Date: Sun Mar  7 16:53:17 2010
New Revision: 920031

URL: http://svn.apache.org/viewvc?rev=920031&view=rev
Log:
Fix stack overflow error involving EnvArray.each on JRuby

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

Modified: buildr/trunk/lib/buildr/core/environment.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/environment.rb?rev=920031&r1=920030&r2=920031&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/environment.rb (original)
+++ buildr/trunk/lib/buildr/core/environment.rb Sun Mar  7 16:53:17 2010
@@ -27,13 +27,13 @@
         replace((ENV[@name] || ENV[@name.downcase] || '').split(/\s*,\s*/).reject(&:empty?))
       end
 
-      (Array.instance_methods - Object.instance_methods - Enumerable.instance_methods).sort.each
do |method|
-        class_eval %{def #{method}(*args, &block) ; result = super ; write ; result ;
end}
+      (Array.instance_methods - Object.instance_methods - Enumerable.instance_methods - ['each']).sort.each
do |method|
+        class_eval %{def #{method}(*args, &block) ; result = super ; write_envarray ;
result ; end}
       end
 
     private
 
-      def write
+      def write_envarray
         ENV[@name.downcase] = nil
         ENV[@name] = map(&:to_s).join(',')
       end



Mime
View raw message