summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-20 20:51:19 (GMT)
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-20 20:51:19 (GMT)
commitd661b27784505635da21056d23de7b790cecac63 (patch)
tree09fef558beb63692b872ef5b18a7ae04f8457491 /enum.c
parent33ae176ba72999807e3eb311c9d9418792e47502 (diff)
enum.c (enum_sort): prevent wasteful array duplicaion
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/enum.c b/enum.c
index f561a68..487ee55 100644
--- a/enum.c
+++ b/enum.c
@@ -938,7 +938,7 @@ enum_first(int argc, VALUE *argv, VALUE obj)
static VALUE
enum_sort(VALUE obj)
{
- return rb_ary_sort(enum_to_a(0, 0, obj));
+ return rb_ary_sort_bang(enum_to_a(0, 0, obj));
}
#define SORT_BY_BUFSIZE 16