From cacecbfc9982b7a2ac9aa165859bfad73ddc32c8 Mon Sep 17 00:00:00 2001 From: yugui Date: Thu, 24 Jun 2010 01:58:56 +0000 Subject: [PATCH] merges r28297 from trunk into ruby_1_9_2. -- * test/ruby/test_method.rb (test_public_methods_with_extended): test for [ruby-dev:41553]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_method.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index 86ab64feb1..7be70b00a6 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -335,4 +335,14 @@ class TestMethod < Test::Unit::TestCase end assert_equal(:ok, d.new.public_method(:foo).call) end + + def test_public_methods_with_extended + m = Module.new do def m1; end end + a = Class.new do def a; end end + bug = '[ruby-dev:41553]' + obj = a.new + assert_equal([:a], obj.public_methods(false), bug) + obj.extend(m) + assert_equal([:m1, :a], obj.public_methods(false), bug) + end end