1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fix null m_tbl

* ext/objspace/objspace.c (memsize_of): m_tbl in prepended
  class/module is NULL.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-06-27 11:36:15 +00:00
parent 8ddbbb3324
commit 28cb8f5d20

View file

@ -60,7 +60,9 @@ memsize_of(VALUE obj)
break; break;
case T_MODULE: case T_MODULE:
case T_CLASS: case T_CLASS:
size += st_memsize(RCLASS_M_TBL(obj)); if (RCLASS_M_TBL(obj)) {
size += st_memsize(RCLASS_M_TBL(obj));
}
if (RCLASS_IV_TBL(obj)) { if (RCLASS_IV_TBL(obj)) {
size += st_memsize(RCLASS_IV_TBL(obj)); size += st_memsize(RCLASS_IV_TBL(obj));
} }