3 ms·NULL vs. Empty Strings – Why Oracle Was Right and Apple Is Not1 points by rusk 9y agowhipoodle 9y agoif (!myString) { } Good old JavaScript.rusk 9y agoyeah I think actually python and ruby do this as well …whipoodle 9y agoPretty 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/9915384whipoodle 9y agoI think it might be more idiomatic, and more in the direction of what the author seeks, to check `my_string.present?` which is false for nil and empty string.rusk 9y agoThat's what they are. Pick one and invert the logic.