End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Symbol#id2name
id2name
string.c
View on GitHub ↗
VALUE
rb_sym_to_s(VALUE sym)
{
return str_new_shared(rb_cString, rb_sym2str(sym));
}
Alias of #to_s
Returns a string representation of self (not including the leading colon):
Example
:foo.to_s # => "foo"
Symbol#id2name is an alias for Symbol#to_s.
Related: Symbol#inspect, Symbol#name.