summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/string.c b/string.c
index 109edd36ba..81b9b9d134 100644
--- a/string.c
+++ b/string.c
@@ -1349,13 +1349,7 @@ rb_string_value(volatile VALUE *ptr)
{
VALUE s = *ptr;
if (TYPE(s) != T_STRING) {
- if (SYMBOL_P(s)) {
- s = rb_sym_to_s(s);
- }
- else {
- s = rb_str_to_str(s);
- }
- *ptr = s;
+ *ptr = rb_str_to_str(s);
}
return s;
}