Ruby Newbie homepage Ruby Newbie homepage

How to use

Quick guide

Official content
Returns the name or string corresponding to sym. Unlike to_s, the returned string is frozen.
:fred.name         #=> "fred"
:fred.name.frozen? #=> true
:fred.to_s         #=> "fred"
:fred.to_s.frozen? #=> false
 
               VALUE
rb_sym2str(VALUE sym)
{

}
            

Was this page useful?