Skip to content

has_key? returns nil when key not found #26

Description

@boricic

Playing around with the gem I've noticed that has_key? method returns nil if the key is not found.

Shouldn't, by generally accepted convention, a method ending with ? return always Boolean?

I can see that method for has_key? might be wrong. The comment says that it returns true/false, but actually it returns Qnil.

https://github.com/tyler/trie/blob/master/ext/trie/trie.c#L87

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions