From 764c6a285e26ba7261cb9c39d4263d2be081e481 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 4 Sep 2000 08:24:09 +0000 Subject: matz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- hash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hash.c') diff --git a/hash.c b/hash.c index 0d65dc9d43..3ff58cc41c 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 -- cgit v1.2.3