Back to the example 1 def read_configuration(filename) 2 f = File.open(filename) 3 host = f.gets 4 port = f.gets.to_i 5 f.close 6 return host, port 7 end Question: Is this exception-safe? If an exception is raised an exception, then: The state is consistent No resources are leaked Answer: Yes, but...