Project

General

Profile

Bug #5902 » array.c_join_one_trusted.patch

duerst (Martin Dürst), 01/18/2012 03:56 PM

View differences:

array.c (working copy)
VALUE val, tmp, result;
if (RARRAY_LEN(ary) == 0) return rb_usascii_str_new(0, 0);
if (OBJ_TAINTED(ary) || OBJ_TAINTED(sep)) taint = TRUE;
if (OBJ_UNTRUSTED(ary) || OBJ_UNTRUSTED(sep)) untrust = TRUE;
if (OBJ_TAINTED(ary) || OBJ_TAINTED(sep)&&RARRAY_LEN(ary)>1) taint = TRUE;
if (OBJ_UNTRUSTED(ary) || OBJ_UNTRUSTED(sep)&&RARRAY_LEN(ary)>1) untrust = TRUE;
if (!NIL_P(sep)) {
StringValue(sep);
(2-2/2)