[macruby-changes] [769] MacRuby/trunk/test-macruby/known_bugs.rb

source_changes at macosforge.org source_changes at macosforge.org
Tue Dec 23 07:45:56 PST 2008


Revision: 769
          http://trac.macosforge.org/projects/ruby/changeset/769
Author:   eloy.de.enige at gmail.com
Date:     2008-12-23 07:45:53 -0800 (Tue, 23 Dec 2008)
Log Message:
-----------
Added bug test case which demonstrates a endless loop when using the private class method on a Kernel method.

Modified Paths:
--------------
    MacRuby/trunk/test-macruby/known_bugs.rb

Modified: MacRuby/trunk/test-macruby/known_bugs.rb
===================================================================
--- MacRuby/trunk/test-macruby/known_bugs.rb	2008-12-23 11:16:57 UTC (rev 768)
+++ MacRuby/trunk/test-macruby/known_bugs.rb	2008-12-23 15:45:53 UTC (rev 769)
@@ -12,4 +12,24 @@
       assert_nothing_raised { YAML.load(data) }
     end
   end
+  
+  class TestKernel < Test::Unit::TestCase
+    module ::Kernel
+      private
+      def is_callable?; true end
+    end
+    
+    module ::Kernel
+      def should_be_callable?; true end
+      private :should_be_callable?
+    end
+    
+    def test_kernel_methods_made_private_with_keyword
+      assert is_callable? # works
+    end
+    
+    def test_kernel_methods_made_private_with_class_method
+      assert should_be_callable? # causes endless loop
+    end
+  end
 end
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20081223/fb523e15/attachment.html>


More information about the macruby-changes mailing list