diff options
author | Lars Kanis <lars@greiz-reinsdorf.de> | 2023-03-06 14:37:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-06 14:37:12 +0100 |
commit | 99046c1852786fc3b23f3a5381b50bfe6caee798 (patch) | |
tree | 71d759a132bf9bf78e9cf43ca68e015cf09f96f1 | |
parent | 4146a85a98fdec9150d633005242fb9f20291241 (diff) | |
parent | 52c7c736ae87955d85e1ff746f6f5b7a57ce7a4e (diff) | |
download | ffi-99046c1852786fc3b23f3a5381b50bfe6caee798.tar.gz |
Merge pull request #1002 from casperisfine/builtin-type-inspect
Fix `Type#inspect` to properly display the constant name
-rw-r--r-- | ext/ffi_c/Type.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/ffi_c/Type.c b/ext/ffi_c/Type.c index 259ae97..d940e94 100644 --- a/ext/ffi_c/Type.c +++ b/ext/ffi_c/Type.c @@ -157,7 +157,7 @@ type_inspect(VALUE self) TypedData_Get_Struct(self, Type, &rbffi_type_data_type, type); - snprintf(buf, sizeof(buf), "#<%s:%p size=%d alignment=%d>", + snprintf(buf, sizeof(buf), "#<%s::%p size=%d alignment=%d>", rb_obj_classname(self), type, (int) type->ffiType->size, (int) type->ffiType->alignment); return rb_str_new2(buf); @@ -198,7 +198,7 @@ builtin_type_inspect(VALUE self) BuiltinType *type; TypedData_Get_Struct(self, BuiltinType, &builtin_type_data_type, type); - snprintf(buf, sizeof(buf), "#<%s:%s size=%d alignment=%d>", + snprintf(buf, sizeof(buf), "#<%s::%s size=%d alignment=%d>", rb_obj_classname(self), type->name, (int) type->type.ffiType->size, type->type.ffiType->alignment); return rb_str_new2(buf); |