Mega Code Archive

 
Categories / Ruby / File Directory
 

Read lines one at a time and initialize a hash

words = {} IO.foreach("/usr/share/dict/words") {|w| words[w] = true}