TwP / inifile

Native Ruby package for reading and writing INI files
http://codeforpeople.rubyforge.org/inifile
95 stars 47 forks source link

Parser refactoring #27

Closed TwP closed 10 years ago

TwP commented 10 years ago

This PR is a complete refactoring of how we parse .ini files. The StringScanner class is no longer used. Instead we parse on a line by line basis. This enables us to read files one line at a time instead of loading the entire contents into a string and then parsing.

In order for this new parser to work, I've used negative lookbehind regular expressions. These are only available with Ruby 1.9 and above. This release of inifile will no longer work with Ruby 1.8.

I've also attempted to address a few of the open issues: closes #15 closes #16 closes #18 closes #26

More changes to follow.