Making an histogram


#1



Im stuck in this section: Sorting the Hash. My code is right because its the same from the first lesson. Sorry for my english. Thanks for the help!
puts "Text, please: "
text = gets.chomp
words = text.split(" ")
frecuency = Hash.new(0)
words.each { |word| frecuency[word] += 1 }
frecuency = frecuency.sort_by {|a, b| b }
frecuency.reverse!


#2

@servohatred,

please try it with frequency