summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 044964c809..f3bd0b66b8 100644
--- a/hash.c
+++ b/hash.c
@@ -984,7 +984,7 @@ rb_hash_aset(VALUE hash, VALUE key, VALUE val)
{
rb_hash_modify(hash);
if (RHASH(hash)->ntbl->type == &identhash ||
- TYPE(key) != T_STRING || st_lookup(RHASH(hash)->ntbl, key, 0)) {
+ rb_obj_class(key) != rb_cString || st_lookup(RHASH(hash)->ntbl, key, 0)) {
st_insert(RHASH(hash)->ntbl, key, val);
}
else {