8 error


#1

Hi guys
Some one can have a look and tell me where is the error??
movies = {"Hola buddy" => 9}
puts "Some user input"
choice=gets.chomp

case choice
when "add"
puts "Add a movie please."
title = gets.chomp
puts "what would you rate this movies"
rating = gets.chomp
if movies[title.to_sym]==nil?
movies[title.to_sym]= rating.to_i
puts "thank you"
else
puts "this movie already exist."
end
when "update"
puts "what title would you like to update?"
title= gets.chomp
if movies[title]==nil
puts "error title!"
else
puts "can you give us a new rating"
movies[title]=gets.chomp
end
when "dispaly"
movies.each do |movie, rating|
puts "#{movie}: #{rating}"
end
when "delete"
puts "Deleted!"
else
puts "Error!"
end

the error that coming after I wrote display is Oops, try again. It looks like your 'puts' doesn't include Hola buddy: 9.
thanks


1/8 Display
#2
when "dispaly"

Should be "display".


#3

..f@#KKK.......thank you.....


#4

And the movie hash is not symbols and in the CASE you are converting them all to case without a reason..