What does this error mean?


#1

secret_identities = {
"The Batman" => "Bruce Wayne",
"Superman" => "Clark Kent",
"Wonder Woman" => "Diana Prince",
"Freakazoid" => "Dexter Douglas"
}

secret_identities.each do |superhero name, real name|
puts "#{superhero name}: #{real name}"
end

the error i get is

(ruby):8: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
puts "#{superhero name}: #{real name}"
^
(ruby):9: syntax error, unexpected keyword_end, expecting $end


#2

you need to put |superhero, real name| in {}