Question - In how many ways you can compare Ruby string?
Answer -
Ruby strings can be compared with three operators:
- With == operator : Returns true or false
- With eql? Operator : Returns true or false
- With casecmp method : Returns 0 if matched or 1 if not matched