Sha256: b05f0069887742dc16529e49159b0d20a8c1aa0a3dbe7c0528f91cf89e2833d5
Contents?: true
Size: 734 Bytes
Versions: 7
Compression:
Stored size: 734 Bytes
Contents
class Boolean `def.$$is_boolean = true` def __id__ `self.valueOf() ? 2 : 0` end alias object_id __id__ 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
7 entries across 7 versions & 1 rubygems