The Right Way 1 def read_configuration(filename) 2 File.open(filename) do |f| 3 server = f.gets 4 port = f.gets.to_i 5 return host, port 6 end 7 end