I am trying to get all the keys with the same value from a hash and put them into an array as separate entries. I have this line of code but it sends everything in as a sing
Maybe this?
h.select {|k, v| v == val}.keys.each {|k| @highest_wf_words << [k]}
Or this:
@highest_wf_words.concat(h.select {|k, v| v == val}.keys.map {|k| [k]})