To make sure that you escape the line return (and any trailing and leading spaces), you should use:

```ruby
name = gets.strip
```