Q. Which method is used to get the length of a string in Ruby?
β
Correct Answer: (D)
Both size and length
Explanation: Both 'size' and 'length' return the length of a string in Ruby.