mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
2000-02-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6f82a67fd0
commit
bf70582cf3
19 changed files with 130 additions and 23 deletions
5
array.c
5
array.c
|
@ -669,7 +669,7 @@ rb_ary_join(ary, sep)
|
|||
VALUE ary, sep;
|
||||
{
|
||||
long i;
|
||||
int taint;
|
||||
int taint = 0;
|
||||
VALUE result, tmp;
|
||||
|
||||
if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
|
||||
|
@ -823,6 +823,7 @@ static VALUE
|
|||
inspect_ary(ary)
|
||||
VALUE ary;
|
||||
{
|
||||
int tainted = OBJ_TAINTED(ary);
|
||||
long i = 0;
|
||||
VALUE s, str;
|
||||
|
||||
|
@ -830,11 +831,13 @@ inspect_ary(ary)
|
|||
|
||||
for (i=0; i<RARRAY(ary)->len; i++) {
|
||||
s = rb_inspect(RARRAY(ary)->ptr[i]);
|
||||
tainted = OBJ_TAINTED(s);
|
||||
if (i > 0) rb_str_cat(str, ", ", 2);
|
||||
rb_str_cat(str, RSTRING(s)->ptr, RSTRING(s)->len);
|
||||
}
|
||||
rb_str_cat(str, "]", 1);
|
||||
|
||||
if (tainted) OBJ_TAINT(str);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue