2/10 unexpected tINTEGER


#1



A Night at the Movies 2/10


It seems that I can't use spaces for movies with multiple words. Currently I get an error saying that it doesnt look like a hash and I have an unexpected tINTEGER.
If I change "11" to "Eleven", it says I have an unexpected tLABEL.
If I change it to Oceans_11 it works just fine. Is there some way to make it where spaces are allowed?
Thanks!


movies = {
    Oceans 11: 4,
}
puts "Type a movie."
gets.chomp


#2

Needs quotes since it contains white space.

"Oceans 11" => 4

#3

Awesome! Thanks mtf! :grin: