From 1fe57a4b5d4d8673e9841f99b23d1935537a855a Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 29 Sep 2009 04:37:52 +0000 Subject: * vm_method.c (rb_add_method_def): nothing to do if old method had same definition. [ruby-dev:39397] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_class.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/ruby/test_class.rb') diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb index 8d618822a5..382dbb9cc3 100644 --- a/test/ruby/test_class.rb +++ b/test/ruby/test_class.rb @@ -130,6 +130,14 @@ class TestClass < Test::Unit::TestCase end end assert_equal("", stderr) + stderr = verbose_warning do + Module.new do + module_function + def foo; end + module_function :foo + end + end + assert_equal("", stderr, '[ruby-dev:39397]') end def test_check_inheritable -- cgit v1.2.3