Closed logicminds closed 3 years ago
Another reason to remove this code is to avoid relying on the interface of Parslet::ParseFailed
, in this case the attribute .cause
. This became a problem in the 0.2.0 release of this gem, when the parslet dependency version was bumped from 1.6.2 to 1.8.0.
Starting from parslet 1.8.0, .cause
was renamed to .parse_failure_cause
(commit).
So when you try to parse some invalid TOML, instead of ParseFailed
you get NoMethodError
as ruby tries to call ascii_tree
on nil
.
https://github.com/jm/toml/blob/master/lib/toml/parser.rb#L11
I want to be able to catch this error and do something more intelligent when I am using this library in my project.
Can you just remove the code?