2 def self.read(filename)
3 File.open(filename, "r") do |f|
8 def self.read_stream(io)
12 until (line = io.gets).nil?
13 if line =~ /^\s*#/ then
15 elsif line =~ /^\[(.*)\]\s*$/ then
16 config << [name, section]
19 elsif line =~ /^\s*(.*?)\s*=\s*(.*?)\s*$/ then
23 config << [name, section]
24 if config.size > 0 and config[0][0] == "" and config[0][1].empty? then