Skip to content
instance method

String#to_s

() -> ::String
to_s → self or new_string

Returns self if self is a String, or self converted to a String if self is a subclass of String.

Related: see Converting to New String.

See also #to_r #to_str #to_json_raw_object #to_sym also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0