1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
mrkn 2016-08-20 20:51:19 +00:00
parent 33ae176ba7
commit d661b27784
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Sat Aug 21 05:47:00 2016 Kenta Murata <mrkn@mrkn.jp>
* enum.c (enum_sort): prevent wasteful array duplicaion.
Sat Aug 20 11:20:32 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* rubystub.c: generalize win32/stub.c.

2
enum.c
View file

@ -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