2010/9/2 Jes Gabriel y Gal <jgabrielygalan / gmail.com>:
> Apart from other suggestions, here some are some notes:
> On Thu, Sep 2, 2010 at 3:28 PM, Evan Riley <rileyc.evan / gmail.com> wrote:
>> Here is my current code:
>>
>> random_number = rand(10)
>>
>> puts 'Can you guess the number?'
>> puts 'Select a number from 1-10 please'
>>
>> players_number = gets.chomp
>
> As you are always using players_number as an integer to, I suggest
> doing the to_i after the gets, so you don't have to repeat it over and
> over:
>
> players_number = gets.chomp.to_i

Or, simply: players_number = gets.to_i