#!/usr/bin/ruby @nan = 0.0/0.0 @inf = 1.0/0.0 def tell_me_the_truth(s) p = eval(s) if p puts "'#{s}' (#{p}) is TRUE." else puts "'#{s}' (#{p}) is FALSE." end end @elist = (); tell_me_the_truth('true') tell_me_the_truth('false') tell_me_the_truth('0') tell_me_the_truth('1') tell_me_the_truth('0.0') tell_me_the_truth('@nan') tell_me_the_truth('@nan == @nan') tell_me_the_truth('@inf') tell_me_the_truth('@inf - 1') tell_me_the_truth('@inf - @inf') tell_me_the_truth('"0"') tell_me_the_truth('"0.0"') tell_me_the_truth('""') tell_me_the_truth('@elist') tell_me_the_truth('{}') tell_me_the_truth('[]') tell_me_the_truth('nil') tell_me_the_truth('!!nil') tell_me_the_truth('!!1')