taint()
public
Marks obj as tainted—if the $SAFE level is set
appropriately, many method calls which
might alter the running programs environment will refuse to accept tainted
strings.
Show source
/*
* call-seq:
* obj.taint -> obj
*
* Marks <i>obj</i> as tainted---if the <code>$SAFE</code> level is
* set appropriately, many method calls which might alter the running
* programs environment will refuse to accept tainted strings.
*/
VALUE
rb_obj_taint(obj)
VALUE obj;
{
rb_secure(4);
if (!OBJ_TAINTED(obj)) {
if (OBJ_FROZEN(obj)) {
rb_error_frozen("object");
}
OBJ_TAINT(obj);
}
return obj;
}