diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-18 19:47:36 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-18 19:47:36 +0000 |
commit | 9c64155f30207cc14ea56af4a8258ad184453546 (patch) | |
tree | bf4ad84defae4c043ca6fb4720357dd3c647fc02 /enum.c | |
parent | 92fa998ce7ae9238532f1a9447685441eecfe189 (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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; |