You can actually do this all in one fell swoop with:

```ruby
user_guess = gets.strip.to_i
#user_guess = user_guess.chomp.to_i
```

Also, I'd always favor `gets.strip` over `gets.chomp`. If a user ever fat fingered their entry from the command line and added an extra space at the end, `strip` will also get rid of that space and the newline, rather than `chomp` which will just get rid of the newline.