summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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