4 ms·
Pretty sure an empty string is truthy in Ruby.
by whipoodle 9y ago
Pretty sure an empty string is truthy in Ruby.
- rusk 9y agoYes you're right. Ruby actually supports the comparison the author seeks [0]: > nil.to_s == "" > "".to_s == "" [0] https://stackoverflow.com/a/9915384 https://stackoverflow.com/a/9915384