[macruby-changes] [237] MacRuby/trunk/lib/rake.rb

source_changes at macosforge.org source_changes at macosforge.org
Thu May 29 15:52:21 PDT 2008


Revision: 237
          http://trac.macosforge.org/projects/ruby/changeset/237
Author:   lsansonetti at apple.com
Date:     2008-05-29 15:52:20 -0700 (Thu, 29 May 2008)

Log Message:
-----------
fixing rake

Modified Paths:
--------------
    MacRuby/trunk/lib/rake.rb

Modified: MacRuby/trunk/lib/rake.rb
===================================================================
--- MacRuby/trunk/lib/rake.rb	2008-05-29 01:24:52 UTC (rev 236)
+++ MacRuby/trunk/lib/rake.rb	2008-05-29 22:52:20 UTC (rev 237)
@@ -1088,8 +1088,9 @@
 # other objects.
 
 include RakeFileUtils
-private(*FileUtils.instance_methods(false))
-private(*RakeFileUtils.instance_methods(false))
+# FIXME: this doesn't work in MacRuby yet
+#private(*FileUtils.instance_methods(false))
+#private(*RakeFileUtils.instance_methods(false))
 
 ######################################################################
 module Rake
@@ -1167,23 +1168,21 @@
     # Now do the delegation.
     DELEGATING_METHODS.each_with_index do |sym, i|
       if SPECIAL_RETURN.include?(sym)
-        ln = __LINE__+1
-        class_eval %{
-          def #{sym}(*args, &block)
+        class_eval do
+	  define_method(sym) do |*args, &block|
             resolve
-            result = @items.send(:#{sym}, *args, &block)
+            result = @items.send(sym, *args, &block)
             FileList.new.import(result)
           end
-        }, __FILE__, ln
+        end
       else
-        ln = __LINE__+1
-        class_eval %{
-          def #{sym}(*args, &block)
+        class_eval do
+	  define_method(sym) do |*args, &block|
             resolve
-            result = @items.send(:#{sym}, *args, &block)
+            result = @items.send(sym, *args, &block)
             result.object_id == @items.object_id ? self : result
-          end
-        }, __FILE__, ln
+          end 
+        end
       end
     end
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080529/ae790450/attachment.htm 


More information about the macruby-changes mailing list