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
This commit is contained in:
yugui 2009-07-13 06:12:55 +00:00
parent b9faaa1832
commit d4c125db78
3 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,10 @@
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 09:31:50 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* proc.c (make_curry_proc): should propagate lambda-ness.

4
enum.c
View file

@ -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;
}

View file

@ -1,6 +1,6 @@
#define RUBY_VERSION "1.9.1"
#define RUBY_RELEASE_DATE "2009-07-12"
#define RUBY_PATCHLEVEL 220
#define RUBY_PATCHLEVEL 221
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1