summaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/st.c b/st.c
index 048e8a22dc..5ca6263db0 100644
--- a/st.c
+++ b/st.c
@@ -2114,8 +2114,8 @@ st_rehash(st_table *tab)
static st_data_t
st_stringify(VALUE key)
{
- return (rb_obj_class(key) == rb_cString) ?
- rb_str_new_frozen(key) : key;
+ return (rb_obj_class(key) == rb_cString && !RB_OBJ_FROZEN(key)) ?
+ rb_hash_key_str(key) : key;
}
static void