David Sprague wrote:

> I'm wrote this code to bin a list of words by word-length:
> 
> dict = Hash.new([])
> 
> dict_file.each do |line|
>   line.chomp!()
>   dict[line.length] << line
> end

words = IO.read( "data2" ).strip.split( /\s+/ )
dict = words.group_by{|w| w.size}