I have a string in Ruby on which I\'m calling the strip method to remove the leading and trailing whitespace. e.g.
s = \"12345 \" s.strip
H
If you want to avoid the error that appears in the question:
s.to_s.strip