I've been working on this all night and cannot seem to grasp what exactly is going on. I understand the histogram portion but the error message is really confusing me since i'm not trying to convert any string into an integer?
its stating that it can't convert string to integer?
puts "Input text please: " text = gets.chomp words = text.split frequencies = Hash.new(0) words.each do |words| frequencies[words] =+ 1 frequencies[words] = frequencies.sort_by do |words, frequencies| frequencies[words].reverse! frequencies[words].frequencies.to_s end end