Revision: 769 http://trac.macosforge.org/projects/ruby/changeset/769 Author: eloy.de.enige@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
participants (1)
-
source_changes@macosforge.org