What is the difference between =~ and == operators?
A. =~ checks for string pattern matching, == checks for equality
B. =~ checks for equality, == checks for string pattern matching
C. Both operators are the same
D. None of the above
Answer: Option A
Related Questions on Basic Syntax in Ruby
What does the 'puts' method do in Ruby?
A. Prints to console
B. Converts to string
C. Finds the length
D. Reads input from user

Join The Discussion