End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Object#itself
obj.itself → obj
object.c
View on GitHub ↗
static VALUE
rb_obj_itself(VALUE obj)
{
return obj;
}
Returns the receiver.
Example
string = "my string" string.itself.object_id == string.object_id #=> true