Method: String#to_s

Defined in:
string.c

#to_sString #to_strString

Returns self.

If called on a subclass of String, converts the receiver to a String object.

Overloads:



6018
6019
6020
6021
6022
6023
6024
6025
# File 'string.c', line 6018

static VALUE
rb_str_to_s(VALUE str)
{
    if (rb_obj_class(str) != rb_cString) {
	return str_duplicate(rb_cString, str);
    }
    return str;
}