summaryrefslogtreecommitdiff
path: root/ext/objspace
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-27 11:36:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-27 11:36:15 +0000
commit28cb8f5d201ba0c0507c79519c4e489039246b9c (patch)
treea5fa30c3de3e2181378d20da6db573f0183353af /ext/objspace
parent8ddbbb33242f413845079b0274c28331cb4aa0f5 (diff)
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
Diffstat (limited to 'ext/objspace')
-rw-r--r--ext/objspace/objspace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c
index 337dcb8..f78b438 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -60,7 +60,9 @@ memsize_of(VALUE obj)
break;
case T_MODULE:
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)) {
size += st_memsize(RCLASS_IV_TBL(obj));
}