I read lines from a serial port in a Ruby script and validate them before parsing. if line.empty? sometimes raises NoMethodError for nil, a line containing only spaces passes the check, and examples online use blank?, which does not exist when I run my script. I was also surprised that if count is true when count is 0.
What does each of these predicates test, which ones are plain Ruby, and what is a robust way to check for "no usable text"?




