Skip to content

Implement String.empty? #2707

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

Closed
wants to merge 1 commit into from

Conversation

korbin
Copy link

@korbin korbin commented Aug 22, 2014

This pull request implements String.empty?/1.

String.empty? allows for cleaner conditional blocks and DRYs string emptiness logic (without equality checks, etc.).

I really like how this composes!

@josevalim
Copy link
Member

Thanks but we don't have List.empty?, nor Integer.zero? and so on. And most of the times is better to pattern match and providing things like empty? partially push us into the wrong direction.

@josevalim josevalim closed this Aug 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants