buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject svn commit: r1406514 - /buildr/trunk/lib/buildr/core/util.rb
Date Wed, 07 Nov 2012 09:58:08 GMT
Author: donaldp
Date: Wed Nov  7 09:58:08 2012
New Revision: 1406514

URL: http://svn.apache.org/viewvc?rev=1406514&view=rev
Log:
Remove monkey-patch as JRUBY-3381 was resolved in JRuby 1.6RC1.

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=1406514&r1=1406513&r2=1406514&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/util.rb (original)
+++ buildr/trunk/lib/buildr/core/util.rb Wed Nov  7 09:58:08 2012
@@ -285,27 +285,6 @@ if Buildr::Util.java_platform?
     remove_method :error if method_defined?(:error)
   end
 
-  # Fix for BUILDR-292.
-  # JRuby fails to rename a file on different devices
-  # this monkey-patch wont be needed when JRUBY-3381 gets resolved.
-  module FileUtils #:nodoc:
-    alias_method :__mv_native, :mv
-
-    def mv(from, to, options = nil)
-      dir_to = File.directory?(to) ? to : File.dirname(to)
-      Array(from).each do |from|
-        dir_from = File.dirname(from)
-        if File.stat(dir_from).dev != File.stat(dir_to).dev
-          cp from, to, options
-          rm from, options
-        else
-          __mv_native from, to, options
-        end
-      end
-    end
-    private :mv
-  end
-
   module RakeFileUtils #:nodoc:
     def rake_merge_option(args, defaults)
       defaults[:verbose] = false if defaults[:verbose] == Rake::FileUtilsExt::DEFAULT



Mime
View raw message