diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-28 00:39:52 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-28 00:39:52 +0000 |
commit | 912df4b615f30c5de468a3f214c86a1ec30cd22f (patch) | |
tree | f03fcdb73ca159ebf68bf84bbf717115bd491fa9 /test | |
parent | a4932b54b561be04690ad45f103072e4ae75a0a4 (diff) | |
download | ruby-912df4b615f30c5de468a3f214c86a1ec30cd22f.tar.gz |
* class.c (class_instance_method_list): consider prepended Class/Module
when recur != 0. [ruby-dev:45863] [Bug #6660]
* test/ruby/test_module.rb (test_prepend_instance_methods_false): add
a test for it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_module.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 0802048e10..8e3dbbc34f 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -1327,4 +1327,10 @@ class TestModule < Test::Unit::TestCase class_eval(&block) if block end end + + def test_prepend_instance_methods_false + bug6660 = '[ruby-dev:45863]' + assert_equal([:m1], Class.new{ prepend Module.new; def m1; end }.instance_methods(false), bug6660) + assert_equal([:m1], Class.new(Class.new{def m2;end}){ prepend Module.new; def m1; end }.instance_methods(false), bug6660) + end end |