This is related to a closed question where some users kindly tried to helped me but at the time I couldn't reproduce the problem exactly.
STARTING POINT
output = [{:selected_person=>true,
:full_name=>"Fn G猫gèksöugöynúõr Ln Ýüćėūpàøehwìėwo",
:address_1=>"Trzy Lipy", :address_2=>"20",
:postal=>"34-567",
:city=>"Gdańsk", :country_code=>"PL"},
{:selected_person=>true,
:full_name=>"Fellow Fellow Last Name", :minor=>false}]
WHAT I WANT TO ACHIEVE
Count the number of occurrences of :selected_person as true in the output
WHAT I HAVE NOW
A. Returns '2' (counts the number of occurrences no matter the value)
output.count { |h| h[:selected_person] = true }
B. Returns '0'
output.count { |h| h[:selected_person]}
EDIT NOTES:
After saving, I didn't notice that the example changed so the link shows a version where version B would work, as pointed out in one answer, but the correct output/starting point is the one pasted here in the question and in the screenshot
