Closed lucassch closed 8 years ago
methods with ? shouldn't return Boolean?
Not really. It must return a value that can be evaluated to true/false. Numeric#nonzero?
, for instance, returns the number when is greater than zero.
100.nonzero?
#=> 100
0.nonzero?
#=> nil
Why do you think returning
false
instead ofnil
will make a difference?