method

String

v2_2_9 - Show latest stable - Class: Kernel
String(p1)
public

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"