From 242351be25cc4cbc055595335b24fb5d23642d30 Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 30 Nov 2008 09:23:35 +0000 Subject: merges r20356 from trunk into ruby_1_9_1. * array.c (rb_ary_times): taint (and untrust) status should be inherited by "ary * 0". [ruby-dev:37024] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- array.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'array.c') diff --git a/array.c b/array.c index 5553b8ff2f..578f7fae90 100644 --- a/array.c +++ b/array.c @@ -2551,7 +2551,10 @@ rb_ary_times(VALUE ary, VALUE times) } len = NUM2LONG(times); - if (len == 0) return ary_new(rb_obj_class(ary), 0); + if (len == 0) { + ary2 = ary_new(rb_obj_class(ary), 0); + goto out; + } if (len < 0) { rb_raise(rb_eArgError, "negative argument"); } @@ -2566,6 +2569,7 @@ rb_ary_times(VALUE ary, VALUE times) for (i=0; i