Seven Languages in Seven Weeks: Day 1

I picked up Seven Languages in Seven Weeks after Martin Fowler recommended it. After half an hour of reading I wrote one whole Ruby program!

i = rand(10)

puts "I'm thinking of a number x ∈ [0,9]. Can you guess it?"

while true do
    print ">> "
    guess = gets.to_i

    break if guess == i
    puts "Too low." if guess < i
    puts "Too high." if guess > i
end
puts "Good job :-)"

(I may have known a little bit of Ruby before I started ;-).