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 0d65dc9..3ff58cc 100644
--- a/hash.c
+++ b/hash.c
@@ -613,7 +613,9 @@ static VALUE
rb_hash_sort(hash)
VALUE hash;
{
- return rb_ary_sort_bang(rb_hash_to_a(hash));
+ VALUE entries = rb_hash_to_a(hash);
+ rb_ary_sort_bang(entries);
+ return entries;
}
static int