summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/objspace/objspace.c5
-rw-r--r--test/objspace/test_objspace.rb2
2 files changed, 5 insertions, 2 deletions
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c
index 2fa6833..50a2277 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -618,7 +618,7 @@ count_imemo_objects(int argc, VALUE *argv, VALUE self)
VALUE hash = setup_hash(argc, argv);
if (imemo_type_ids[0] == 0) {
- imemo_type_ids[0] = rb_intern("imemo_none");
+ imemo_type_ids[0] = rb_intern("imemo_env");
imemo_type_ids[1] = rb_intern("imemo_cref");
imemo_type_ids[2] = rb_intern("imemo_svar");
imemo_type_ids[3] = rb_intern("imemo_throw_data");
@@ -627,7 +627,8 @@ count_imemo_objects(int argc, VALUE *argv, VALUE self)
imemo_type_ids[6] = rb_intern("imemo_ment");
imemo_type_ids[7] = rb_intern("imemo_iseq");
imemo_type_ids[8] = rb_intern("imemo_tmpbuf");
- imemo_type_ids[9] = rb_intern("imemo_parser_strterm");
+ imemo_type_ids[9] = rb_intern("imemo_ast");
+ imemo_type_ids[10] = rb_intern("imemo_parser_strterm");
}
rb_objspace_each_objects(count_imemo_objects_i, (void *)hash);
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index 9471702..f139b90 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -98,6 +98,8 @@ class TestObjSpace < Test::Unit::TestCase
res = ObjectSpace.count_imemo_objects
assert_not_empty(res)
assert_not_nil(res[:imemo_cref])
+ assert_not_empty res.inspect
+
arg = {}
res = ObjectSpace.count_imemo_objects(arg)
assert_not_empty(res)