Ad
  • Custom User Avatar

    Hi ! Thanks for your feedback :) s.chomp did 2 things : specifying the return value as being s (last line of the method) and in the meantime removing the last character '\n' from s. If you don't specify any return value (that's what happened when you removed s.chomp), it returns the range used in your for loop.
    Replacing s.chomp by s would have made the tests fail as the final string shouldn't have a '\n' at the end.