Method: Kernel#String
- Defined in:
- object.c
#String(arg) ⇒ String
Returns arg as a String.
First tries to call its to_str method, then its to_s method.
String(self) #=> "main"
String(self.class) #=> "Object"
String(123456) #=> "123456"
3032 3033 3034 3035 3036 |
# File 'object.c', line 3032
static VALUE
rb_f_string(VALUE obj, VALUE arg)
{
return rb_String(arg);
}
|