summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index bf77840170a..dd01aa17c47 100644
--- a/hash.c
+++ b/hash.c
@@ -371,7 +371,9 @@ hash_delete(hash, key)
}
else if (st_delete(RHASH(hash)->tbl, &key, &val))
return val;
- if (iterator_p()) rb_yield(key);
+ if (iterator_p()) {
+ return rb_yield(key);
+ }
return Qnil;
}