So I have this test script
require 'yaml'
hashYaml = YAML::load_file("./monFichier.yaml")
puts "hashYaml : "
puts hashYaml
hashManuel = {enonce: "ma question", titre: "mon titre" }
puts "hashManuel : "
puts hashManuel
where ./monFichier.yaml contains the following lines :
- enonce: "ma question"
titre: "mon titre"
and the output is :
hashYaml :
{"enonce"=>"ma question", "titre"=>"mon titre"}
hashManuel :
{:enonce=>"ma question", :titre=>"mon titre"}
Can somebody please explain
- why both lines are different ?
- how I could obtain
hashYaml
in the same format ashashManuel
?
Cheers,