diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-27 12:01:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-27 12:01:39 +0000 |
commit | 48c04ad0d82ec4339ffd12ad4717b4dbde2aa74f (patch) | |
tree | ffb8a354efbfb1659f6e1d2ae725c5c3d637e717 /test | |
parent | 28cb8f5d201ba0c0507c79519c4e489039246b9c (diff) | |
download | ruby-48c04ad0d82ec4339ffd12ad4717b4dbde2aa74f.tar.gz |
fix null m_tbl
* class.c (class_instance_method_list): m_tbl in prepended
class/module is NULL. [ruby-core:45915][Bug #6655]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_module.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index decb217289..5826ed0269 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -1270,4 +1270,9 @@ class TestModule < Test::Unit::TestCase expected = [:M2,[:M3,[:C1,[:M4,[:M1,[:C0,[:M0],:C0],:M1],:M4],:C1],:M3],:M2] assert_equal(expected, obj.m1) end + + def test_prepend_instance_methods + bug6655 = '[ruby-core:45915]' + assert_equal(Object.instance_methods, Class.new {prepend Module.new}.instance_methods, bug6655) + end end |