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
This commit is contained in:
nobu 2012-06-27 12:01:39 +00:00
parent 28cb8f5d20
commit 48c04ad0d8
3 changed files with 11 additions and 1 deletions

View file

@ -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