End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
String#+@
+string → new_string or self
string.c
View on GitHub ↗
static VALUE
str_uplus(VALUE str)
{
if (OBJ_FROZEN(str)) {
return rb_str_dup(str);
}
else {
return str;
}
}
Returns self if self is not frozen.
Otherwise. returns self.dup, which is not frozen.