summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-20 20:51:19 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-20 20:51:19 +0000
commitd661b27784505635da21056d23de7b790cecac63 (patch)
tree09fef558beb63692b872ef5b18a7ae04f8457491
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
-rw-r--r--ChangeLog4
-rw-r--r--enum.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d00f97e..25350fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
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