jm / toml

Parse TOML. Like a bawss.
MIT License
151 stars 37 forks source link

Is not able to parse hard example? #23

Open lessless opened 11 years ago

lessless commented 11 years ago

After error with my file I've tried to parse an https://github.com/mojombo/toml/blob/master/tests/hard_example.toml and its failed


TOML.load_file('hard_example.toml')
Failed to match sequence (ALL_SPACE (KEY_GROUP / KEY_VALUE / COMMENT_LINE){0, } ALL_SPACE) at line 18 char 9.
`- Extra input after last repetition at line 18 char 9.
   `- Failed to match [ \t\r\n] at line 18 char 9.
NoMethodError: undefined method `each' for nil:NilClass
    from /home/lessless/.rvm/gems/ruby-2.0.0-p247/gems/toml-0.0.4/lib/toml/parser.rb:21:in `initialize'
    from /home/lessless/.rvm/gems/ruby-2.0.0-p247/gems/toml-0.0.4/lib/toml.rb:24:in `new'
    from /home/lessless/.rvm/gems/ruby-2.0.0-p247/gems/toml-0.0.4/lib/toml.rb:24:in `load_file'
    from (irb):2
    from /home/lessless/.rvm/rubies/ruby-2.0.0-p247/bin/irb:13:in `<main>'

Is this gem broken?

dirk commented 10 years ago

Hey, this is a bug in 0.0.4. Installing from this git repo at @e5ac4165eedea078efa4fb9392b84cb14a31e121 or later should fix it.

(I'm also unable to reproduce this running 1.9.3-p374 or 2.0.0-p247 at @56ad6ceb6e4d7a8882c96c383abb9866addcff66.)

lessless commented 10 years ago

@dirk confirming that everything's good here :+1:

dirk commented 10 years ago

Yay!

@jm Have you had a chance to push the new version of the gem?