summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index cc58f608cc..513eeb4347 100644
--- a/hash.c
+++ b/hash.c
@@ -333,6 +333,7 @@ static VALUE
rb_hash_set_default(hash, ifnone)
VALUE hash, ifnone;
{
+ rb_hash_modify(hash);
RHASH(hash)->ifnone = ifnone;
return hash;
}