summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-18 19:47:36 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-18 19:47:36 (GMT)
commit9c64155f30207cc14ea56af4a8258ad184453546 (patch)
treebf4ad84defae4c043ca6fb4720357dd3c647fc02 /enum.c
parent92fa998ce7ae9238532f1a9447685441eecfe189 (diff)
* enum.c (enum_sort_by): add WBs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/enum.c b/enum.c
index cd43662..f561960 100644
--- a/enum.c
+++ b/enum.c
@@ -846,8 +846,8 @@ enum_sort(VALUE obj)
#define SORT_BY_BUFSIZE 16
struct sort_by_data {
- VALUE ary;
- VALUE buf;
+ const VALUE ary;
+ const VALUE buf;
long n;
};
@@ -989,8 +989,8 @@ enum_sort_by(VALUE obj)
memo = MEMO_NEW(0, 0, 0);
OBJ_INFECT(memo, obj);
data = (struct sort_by_data *)&memo->v1;
- data->ary = ary;
- data->buf = buf;
+ RB_OBJ_WRITE(memo, &data->ary, ary);
+ RB_OBJ_WRITE(memo, &data->buf, buf);
data->n = 0;
rb_block_call(obj, id_each, 0, 0, sort_by_i, (VALUE)memo);
ary = data->ary;