Is there a better way than the following to check to see if a string is nil OR has a length of 0 in Ruby?
if !my_str
Have you tried Refinements?
module Nothingness refine String do alias_method :nothing?, :empty? end refine NilClass do alias_method :nothing?, :nil? end end using Nothingness return my_string.nothing?