summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/string.c b/string.c
index fa95ee9d09..9c79b2104c 100644
--- a/string.c
+++ b/string.c
@@ -370,8 +370,7 @@ rb_str_capacity(VALUE str)
static inline VALUE
str_alloc(VALUE klass)
{
- NEWOBJ(str, struct RString);
- OBJSETUP(str, klass, T_STRING);
+ NEWOBJ_OF(str, struct RString, klass, T_STRING);
str->as.heap.ptr = 0;
str->as.heap.len = 0;