From 366e1c3884e97b0d833b8805a6afcd9071ea1e8b Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 15 Feb 2011 07:08:18 +0000 Subject: [PATCH] * array.c (inspect_ary): don't taint the inspected result of a recursive array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ array.c | 2 +- test/ruby/test_string.rb | 8 -------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index b550e8c8d1..d36ff36883 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Feb 14 15:00:16 2011 NARUSE, Yui + + * array.c (inspect_ary): don't taint the inspected result of a + recursive array. + Tue Feb 15 15:43:29 2011 NARUSE, Yui * encoding.c (rb_enc_compatible): change the rule for empty strings: diff --git a/array.c b/array.c index 90dcf1c86e..f38e70609f 100644 --- a/array.c +++ b/array.c @@ -1743,7 +1743,7 @@ inspect_ary(VALUE ary, VALUE dummy, int recur) long i; VALUE s, str; - if (recur) return rb_tainted_str_new2("[...]"); + if (recur) return rb_usascii_str_new_cstr("[...]"); str = rb_str_buf_new2("["); for (i=0; i