instance method
String#+@
() -> self
+string → new_string or self
string.c
View on GitHub ↗
static VALUE
str_uplus(VALUE str)
{
if (OBJ_FROZEN(str) || CHILLED_STRING_P(str)) {
return rb_str_dup(str);
}
else {
return str;
}
}
Returns self if self is not frozen and can be mutated without warning issuance.
Otherwise returns self.dup, which is not frozen.
Related: see Freezing/Unfreezing.