summaryrefslogtreecommitdiff
path: root/ext/objspace
diff options
context:
space:
mode:
Diffstat (limited to 'ext/objspace')
-rw-r--r--ext/objspace/objspace_dump.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/objspace/objspace_dump.c b/ext/objspace/objspace_dump.c
index 60a76db884..e3124b0af5 100644
--- a/ext/objspace/objspace_dump.c
+++ b/ext/objspace/objspace_dump.c
@@ -156,8 +156,6 @@ reachable_object_i(VALUE ref, void *data)
static void
dump_object(VALUE obj, struct dump_config *dc)
{
- int enc;
- long length;
size_t memsize;
struct allocation_info *ainfo;
rb_io_t *fptr;
@@ -192,7 +190,7 @@ dump_object(VALUE obj, struct dump_config *dc)
dump_append(dc, ", \"shared\":true");
else {
dump_append(dc, ", \"bytesize\":%ld", RSTRING_LEN(obj));
- if (!STR_EMBED_P(obj) && !STR_NOCAPA_P(obj) && rb_str_capacity(obj) != RSTRING_LEN(obj))
+ if (!STR_EMBED_P(obj) && !STR_NOCAPA_P(obj) && (long)rb_str_capacity(obj) != RSTRING_LEN(obj))
dump_append(dc, ", \"capacity\":%ld", rb_str_capacity(obj));
if (is_ascii_string(obj)) {