summaryrefslogtreecommitdiff
path: root/ext/objspace
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-15 04:42:23 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-15 04:42:23 +0000
commit1448b0abf5247a4e4eec07a65aafa13d347a016a (patch)
tree6bdfa2cec334de5e538b0a9741e976388e2f043b /ext/objspace
parent82eef27f46a56f033c61e2724ababb0a7997b465 (diff)
* ext/objspace/objspace.c (reachable_object_from_root_i):
reachable objects should not include categories and category_objects because it is noisy information. In fact, objects created after calling ObjectSpace.reachable_objects_from_root should not be included as a returning hash objects. Currently, mswin64 platform has a problem because of this behaviour. Should we trace new objects? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44222 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 6dce515..bddc1ce 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -679,7 +679,9 @@ reachable_object_from_root_i(const char *category, VALUE obj, void *ptr)
rb_hash_aset(data->categories, category_str, category_objects);
}
- if (rb_objspace_markable_object_p(obj)) {
+ if (rb_objspace_markable_object_p(obj) &&
+ obj != data->categories &&
+ obj != data->last_category_objects) {
if (rb_objspace_internal_object_p(obj)) {
obj = iow_newobj(obj);
}