In Python I can determine the boolean value an expression evaluates to if I use the bool
function. For example:
bool(1)
#=> True
Does such a construct exist in Ruby? I can't seem to find evidence that it does. I'm currently having to use equivalence tests to determine boolean values and was wondering if there was more a convenient way of doing this.