mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
622fb1ca50
commit
c0ea75f966
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue