Code Editor
Learn
A Night at the Movies

Not My Type

Perfect! Our program is really coming along.

You might have wondered how we're going to get our movies and ratings from the user—which come in as strings—into the hash where we want our movies to be symbols and our ratings to be integers. Built-in Ruby magic to the rescue!

Ruby's .to_sym method can convert a string to a symbol, and .to_i will convert a string to an integer.

Report a Bug
If you see a bug or any other issue with this page, please report it here.