kschiess / parslet

A small PEG based parser library. See the Hacking page in the Wiki as well.
kschiess.github.com/parslet
MIT License
809 stars 95 forks source link

undefined method `parse_failure_cause' #173

Closed Mackaber closed 7 years ago

Mackaber commented 7 years ago

Trying to run the examples included in your getting started guide (http://kschiess.github.io/parslet/get-started.html) gets me the error:

NoMethodError: undefined method `parse_failure_cause' for #<Parslet::ParseFailed:0x007f93b142f648>
        from miniparser.rb:22:in `rescue in parse'
        from miniparser.rb:18:in `parse'
        from (irb):6
        from /Users/mackaber/.rvm/rubies/ruby-2.1.8/bin/irb:11:in `<main>'

However looking at the documentation I realized it should be:

     failure.cause.ascii_tree

Not

    failure.parse_failure_cause.ascii_tree
kschiess commented 7 years ago

Yeah, that's because we've published the new versions API ahead of time. It used to be just cause.