Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Symbol#to_s
to_s → string
string.c
View on GitHub ↗
VALUE
rb_sym_to_s(VALUE sym)
{
return str_new_shared(rb_cString, rb_sym2str(sym));
}
Returns a string representation of self (not including the leading colon):
Example
:foo.to_s # => "foo"
Related: Symbol#inspect, Symbol#name.