GlobalNamesArchitecture / biodiversity

Scientific Name Parser
MIT License
33 stars 7 forks source link

Possible bug: Biodiversity::Parser.parse() complains about two arguments given #26

Closed rubyFeedback closed 2 years ago

rubyFeedback commented 2 years ago

Hi,

Just installed the latest biodiversity gem.

When trying the example:

Biodiversity::Parser.parse("Plantago major", simple = true)

I get that error:

/root/.gem/gems/biodiversity-5.5.2/lib/biodiversity/parser.rb:36:in `parse': wrong number of arguments (given 2, expected 1) (ArgumentError)

Has the API changed? If so then the example could perhaps be modified.

LocoDelAssembly commented 2 years ago

Yes, it did. README might be outdated.

https://github.com/GlobalNamesArchitecture/biodiversity/blob/c3b75547afdc5b5cb1e18c7a9072d47aa3672d9b/lib/biodiversity/parser.rb#L36

Correct form would be Biodiversity::Parser.parse("Plantago major", simple: true)

dimus commented 2 years ago

Thanks for spotting outdated bits in the README, fixed now.