Basic Ruby Idioms: Checking For An Empty String
Page 15 of The Ruby Way (2nd edition) presents a basic Ruby idiom for checking whether a string is empty or not.
I believe there are three ways to do it (if you can think of any others, leave a comment!). Two reasonably obvious, but one that’s quite idiomatic (the one that The Ruby Way mentions):
str.empty? [...]

