summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Boussier <byroot@ruby-lang.org>2022-12-09 15:22:10 +0100
committerJean Boussier <jean.boussier@gmail.com>2022-12-09 17:06:21 +0100
commitd7812d1949b6315eff5088c6f74eaf9ef6b34119 (patch)
treee093b025f6de77b08e1775b83137244f70c4a76b
parent12b52686790582e30d7d92f2070741d28be8c517 (diff)
objspace_dump.c: dump the capacity field for INITIAL_CAPACITY shapes
We forgot about that one, it's quite useful to see which capacity we started from.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6891
-rw-r--r--ext/objspace/objspace_dump.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/objspace/objspace_dump.c b/ext/objspace/objspace_dump.c
index bcc258eb25..5e2b417fbe 100644
--- a/ext/objspace/objspace_dump.c
+++ b/ext/objspace/objspace_dump.c
@@ -747,6 +747,8 @@ shape_i(rb_shape_t *shape, void *data)
break;
case SHAPE_INITIAL_CAPACITY:
dump_append(dc, "\"INITIAL_CAPACITY\"");
+ dump_append(dc, ", \"capacity\":");
+ dump_append_sizet(dc, shape->capacity);
break;
case SHAPE_T_OBJECT:
dump_append(dc, "\"T_OBJECT\"");