Q. Which method converts a symbol to a string in Ruby?

  • (A) to_s
  • (B) to_str
  • (C) to_sym
  • (D) to_string
πŸ’¬ Discuss
βœ… Correct Answer: (A) to_s
Explanation: The to_s method converts a symbol to its string representation.
Explanation by: Rati Dubey
The to_s method converts a symbol to its string representation.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
75
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
91%
Success Rate