Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

has_key? returns nil when key not found #26

Open
boricic opened this issue Nov 25, 2016 · 0 comments
Open

has_key? returns nil when key not found #26

boricic opened this issue Nov 25, 2016 · 0 comments

Comments

@boricic
Copy link

boricic commented Nov 25, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant