Hello,
I need to have correct order of values inside Ruby array after parsing YAML file.
I have this simple example showing my issue:
x = "columns:\n col_1 : ~\n col_2 : ~\n col_3 : ~\n col4 : ~"
s = YAML::load(x)
console output gives :
x = "columns:\n col_1 : ~\n col_2 : ~\n col_3 : ~\n col4 : ~"
=> "columns:\n col_1 : ~\n col_2 : ~\n col_3 : ~\n col4 : ~"
s = YAML::load(x)
=> {"columns"=>{"col_3"=>nil, "col4"=>nil, "col_1"=>nil, "col_2"=>nil}}
"columns" array is in different sequence as it was in input data :(