def hash_from_file(file_name)
  IO.read(file_name).inject({}) { |hash, line| hash.merge 
Hash[*line.split(/=/)] }
end

Devin

Jeff Carlson wrote:

> Oops, I meant the *getMapFromFile* function.  If I could see the ruby 
> way of writing a method to take a file of the form
> key1=value1
> key2=value2
> etc
> and easily make it into a hash in a concise way (as in the python 
> example) that would be great.
>