summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 2f53c24647..9b4c315a09 100644
--- a/hash.c
+++ b/hash.c
@@ -2643,7 +2643,8 @@ rb_hash_except(int argc, VALUE *argv, VALUE hash)
int i;
VALUE key, result;
- result = rb_obj_dup(hash);
+ result = hash_alloc(rb_cHash);
+ hash_copy(result, hash);
for (i = 0; i < argc; i++) {
key = argv[i];