summaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-09-04 08:24:09 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-09-04 08:24:09 +0000
commit23dc3129ca3bbf0680b56cbae6917d83884bf318 (patch)
tree06e76fe12d3cb73bd19801705186900b524d8268 /hash.c
parentab206c84fffdae3d38cf6eba3b3c2949ac23c1ec (diff)
downloadruby-23dc3129ca3bbf0680b56cbae6917d83884bf318.tar.gz
ruby-23dc3129ca3bbf0680b56cbae6917d83884bf318.tar.xz
ruby-23dc3129ca3bbf0680b56cbae6917d83884bf318.zip
matz
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 0d65dc9d4..3ff58cc41 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