summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index c405110ebf..b06b988eab 100644
--- a/gc.c
+++ b/gc.c
@@ -3946,6 +3946,12 @@ gc_count_add_each_types(VALUE hash, const char *name, const size_t *types)
}
#endif
+size_t
+rb_gc_count(void)
+{
+ return rb_objspace.count;
+}
+
/*
* call-seq:
* GC.count -> Integer
@@ -3959,7 +3965,7 @@ gc_count_add_each_types(VALUE hash, const char *name, const size_t *types)
static VALUE
gc_count(VALUE self)
{
- return UINT2NUM(rb_objspace.count);
+ return SIZET2NUM(rb_gc_count());
}
/*