Sha256: 7366a6f819919404565ab9f8736757871d643cc33abe34c23ee1886b545fa891
Contents?: true
Size: 660 Bytes
Versions: 9
Compression:
Stored size: 660 Bytes
Contents
class Boolean `def.$$is_boolean = true` class << self undef_method :new end def ! `self != true` end def &(other) `(self == true) ? (other !== false && other !== nil) : false` end def |(other) `(self == true) ? true : (other !== false && other !== nil)` end def ^(other) `(self == true) ? (other === false || other === nil) : (other !== false && other !== nil)` end def ==(other) `(self == true) === other.valueOf()` end alias equal? == alias singleton_class class def to_s `(self == true) ? 'true' : 'false'` end end TrueClass = Boolean FalseClass = Boolean TRUE = true FALSE = false
Version data entries
9 entries across 9 versions & 2 rubygems