diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-12 02:58:47 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-12 02:58:47 +0000 |
commit | c0ea75f966dd6b402ff2d7016eeeaef12f95ebdf (patch) | |
tree | 3f14790bd0c16f185493d71387a1f644142a943d /test | |
parent | 622fb1ca50ca273924a2cd6ad58a6a6ff2a7f18e (diff) | |
download | ruby-c0ea75f966dd6b402ff2d7016eeeaef12f95ebdf.tar.gz |
* 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/trunk@28297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_method.rb | 10 |
1 files changed, 10 insertions, 0 deletions
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 |