Method: String#to_s
- Defined in:
- string.c
permalink #to_s ⇒ String #to_str ⇒ String
Returns self
.
If called on a subclass of String, converts the receiver to a String object.
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;
}
|