Maintenance Ruby 3.3 gets fixes, but no new features. 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.