ruby-changes:16324
From: nobu <ko1@a...>
Date: Sat, 12 Jun 2010 11:58:56 +0900 (JST)
Subject: [ruby-changes:16324] Ruby:r28297 (trunk): * test/ruby/test_method.rb (test_public_methods_with_extended): test for .
nobu 2010-06-12 11:58:47 +0900 (Sat, 12 Jun 2010) New Revision: 28297 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28297 Log: * test/ruby/test_method.rb (test_public_methods_with_extended): test for [ruby-dev:41553]. Modified files: trunk/test/ruby/test_method.rb Index: test/ruby/test_method.rb =================================================================== --- test/ruby/test_method.rb (revision 28296) +++ test/ruby/test_method.rb (revision 28297) @@ -335,4 +335,14 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/