Why is a Regexp object considered to be “falsy” in Ruby?
问题 Ruby has a universal idea of " truthiness " and " falsiness ". Ruby does have two specific classes for Boolean objects, TrueClass and FalseClass, with singleton instances denoted by the special variables true and false , respectively. However, truthiness and falsiness are not limited to instances of those two classes, the concept is universal and applies to every single object in Ruby. Every object is either truthy or falsy . The rules are very simple. In particular, only two objects are