This is the first post.
Please point out any mistakes.
Strings and symbols look similar but different.
The difference is that the given object ID is different.
In the case of a character string, the object ID given will be different even if two identical character strings are prepared, but in the case of a symbol, the same object ID will be given even if two same character strings are prepared.
Looking specifically, it looks like this. Execution result If you display the object ID using the "object_id" of the method that displays the object ID for the object, it will look like this.
The object IDs for the top two strings ("JUN") are displayed differently, but the object IDs for the symbol (: JUN) are the same.
By the way Obviously, if you run it again, the object ID given to the string will be different compared to the first time, but the object ID of the symbol will be the same as the first time.
Furthermore, at the first execution, it was displayed in all uppercase letters (: JUN), but if it is written in lowercase letters (: jun), an object ID different from that in uppercase letters will be given.