diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-13 06:12:55 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-13 06:12:55 +0000 |
commit | d4c125db780049373dcae3711c5c63212069375e (patch) | |
tree | 13a487bab03c40c642be3f675acc8e040152fdc8 /enum.c | |
parent | b9faaa1832d31bd8d935b3afcadd81a5eb2252ed (diff) |
merges r23971 from trunk into ruby_1_9_1.
--
* enum.c (enum_to_a): should propagate taint to the return value.
[ruby-core:24152]
* enum.c (enum_sort_by): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r-- | enum.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -409,6 +409,7 @@ enum_to_a(int argc, VALUE *argv, VALUE obj) VALUE ary = rb_ary_new(); rb_block_call(obj, id_each, argc, argv, collect_all, ary); + OBJ_INFECT(ary, obj); return ary; } @@ -602,6 +603,7 @@ enum_group_by(VALUE obj) hash = rb_hash_new(); rb_block_call(obj, id_each, 0, 0, group_by_i, hash); + OBJ_INFECT(hash, obj); return hash; } @@ -810,6 +812,8 @@ enum_sort_by(VALUE obj) RARRAY_PTR(ary)[i] = RNODE(RARRAY_PTR(ary)[i])->u2.value; } RBASIC(ary)->klass = rb_cArray; + OBJ_INFECT(ary, obj); + return ary; } |