VOOZH about

URL: https://www.geeksforgeeks.org/ruby/ruby-symbol-function/

⇱ Ruby | Symbol === function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Ruby | Symbol === function

Last Updated : 10 Dec, 2019
Symbol#===() : ===() is a Symbol class method which compares two Symbol objects.
Syntax: Symbol.===() Parameter: Symbol values Return: true - if both the symbols are equal otherwise return false
Example #1 : Output :
Symbol a : aBcDeF

Symbol b : äöü

Symbol c : ABCDEF



Symbol a === form : false

Symbol b === form : true

Symbol c === form : false

Example #2 : Output :
Symbol a : geeks

Symbol b : åöó

Symbol c : GEEKS



Symbol a === form : false

Symbol b === form : true

Symbol c === form : false

Comment
Article Tags: