summaryrefslogtreecommitdiff
path: root/ext/dl/cptr.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl/cptr.c')
-rw-r--r--ext/dl/cptr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/dl/cptr.c b/ext/dl/cptr.c
index 9e59139..b3d7ef9 100644
--- a/ext/dl/cptr.c
+++ b/ext/dl/cptr.c
@@ -391,9 +391,8 @@ rb_dlptr_inspect(VALUE self)
char str[1024];
TypedData_Get_Struct(self, struct ptr_data, &dlptr_data_type, data);
- snprintf(str, 1023, "#<%s:%p ptr=%p size=%ld free=%p>",
- rb_class2name(CLASS_OF(self)), data, data->ptr, data->size, data->free);
- return rb_str_new2(str);
+ return rb_sprintf("#<%"PRIsVALUE":%p ptr=%p size=%ld free=%p>",
+ CLASS_OF(self), data, data->ptr, data->size, data->free);
}
/*