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

Deprecate #absnt? and #prsnt? in favor of #absent? and #present? #31

Closed txus closed 13 years ago

txus commented 13 years ago

Since I got myself some spare time this afternoon, I've done a quick branch with the changes required by issue #28 :)

There are a total of 3 commits! The Parslet.deprecate method is from rspec-core.

https://github.com/txus/parslet/commits/deprecations

kschiess commented 13 years ago

Hi txus,

Thanks for the patch. Can you remove the deprecate method? I would prefer to just have both methods without warning for now, with the associated specs. I'll just remove absnt/prsnt once I go 2.0 and will warn people then and there. We could perhaps just create a 2.0 section in the HISTORY.TXT file that mentions the breaking changes that will happen.

I am trying to keep Parslet.* method count down, since such a large number of examples and real code include it. Plus, I am totally not a fan of rails/rspec deprecation warnings...

best regards, kaspar

txus commented 13 years ago

No problem! Now they are just aliases, although if you look at the code the "main" method appears as #absent? and #present?, which is solely to keep in mind what the new, shiny API will be :)

kschiess commented 13 years ago

Done in master.