summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-26 05:47:27 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-26 05:47:27 +0000
commitad0ef29da7ac37b978c281b1e0070fbb6afbe2e6 (patch)
treeee2907ff8f2b69660105cbfc10e430d7dbce70f8 /enum.c
parentbf2a494ebcde5e3aea63b1b67990ff73bd474416 (diff)
* array.c (rb_ary_splice): use RARRAY_PTR_USE() without WB because
there are not new relations. * enum.c (enum_sort_by): ditto. * struct.c (setup_struct): use RARRAY_RAWPTR(). * vm_eval.c (yield_under): ditto. * ext/pathname/pathname.c (path_entries): use RARRAY_AREF(). * ext/pathname/pathname.c (path_s_glob): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/enum.c b/enum.c
index 8dd24514b5..e977dedd76 100644
--- a/enum.c
+++ b/enum.c
@@ -944,8 +944,9 @@ enum_sort_by(VALUE obj)
rb_ary_concat(ary, buf);
}
if (RARRAY_LEN(ary) > 2) {
- ruby_qsort(RARRAY_PTR(ary), RARRAY_LEN(ary)/2, 2*sizeof(VALUE),
- sort_by_cmp, (void *)ary);
+ RARRAY_PTR_USE(ary, ptr,
+ ruby_qsort(ptr, RARRAY_LEN(ary)/2, 2*sizeof(VALUE),
+ sort_by_cmp, (void *)ary));
}
if (RBASIC(ary)->klass) {
rb_raise(rb_eRuntimeError, "sort_by reentered");