diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-06 01:03:16 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-06 01:03:16 +0000 |
| commit | cd77cfe90b851ce93a7fbe21e5065419ec2c4b87 (patch) | |
| tree | 1c6695a4c56a90e54c50ff1452b5de8736644197 | |
| parent | 9c4668aecef4e5f656d5b5d980b14d39a58282d7 (diff) | |
| download | ruby-cd77cfe90b851ce93a7fbe21e5065419ec2c4b87.tar.gz ruby-cd77cfe90b851ce93a7fbe21e5065419ec2c4b87.tar.xz ruby-cd77cfe90b851ce93a7fbe21e5065419ec2c4b87.zip | |
* enum.c (enum_to_a): should propagate taint to the return value.
[ruby-core:24152]
* enum.c (enum_sort_by): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | enum.c | 4 |
2 files changed, 11 insertions, 0 deletions
@@ -19,6 +19,13 @@ Mon Jul 6 09:04:45 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * enum.c (enum_join): deals with self recursive objects to get rid of infinite recursion. [ruby-core:24150] +Mon Jul 6 08:00:10 2009 Yukihiro Matsumoto <matz@ruby-lang.org> + + * enum.c (enum_to_a): should propagate taint to the return value. + [ruby-core:24152] + + * enum.c (enum_sort_by): ditto. + Mon Jul 6 00:41:41 2009 Tadayoshi Funaba <tadf@dotrb.org> * rational.c: edited rdoc. @@ -412,6 +412,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; } @@ -605,6 +606,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; } @@ -816,6 +818,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; } |
