summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index f57a3cebda..65f5fe920b 100644
--- a/object.c
+++ b/object.c
@@ -831,7 +831,7 @@ str2cstr(str, len)
{
if (NIL_P(str)) return NULL;
if (TYPE(str) != T_STRING) {
- str = rb_convert_type(str, T_STRING, "String", "to_str");
+ str = str_to_str(str);
}
if (len) *len = RSTRING(str)->len;
return RSTRING(str)->ptr;