Sha256: 9d983f3c7387f24603f943de9cf11e0f432112bfc22eadebbe30a67179850b8b

Contents?: true

Size: 473 Bytes

Versions: 11

Compression:

Stored size: 473 Bytes

Contents

class NilClass
  def &(other)
    false
  end

  def |(other)
    `other !== false && other !== nil`
  end

  def ^(other)
    `other !== false && other !== nil`
  end

  def ==(other)
    `other === nil`
  end

  def inspect
    'nil'
  end

  def nil?
    true
  end

  def singleton_class
    NilClass
  end

  def to_a
    []
  end

  def to_i
    0
  end

  alias to_f to_i

  def to_json
    'null'
  end

  def to_native
    `null`
  end

  def to_s
    ''
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
opal-0.3.37 lib/assets/javascripts/opal/nil_class.rb
opal-0.3.36 lib/assets/javascripts/opal/nil_class.rb
opal-0.3.35 lib/assets/javascripts/opal/nil_class.rb
opal-0.3.34 lib/assets/javascripts/opal/nil_class.rb
opal-0.3.33 core/nil_class.rb
opal-0.3.32 core/nil_class.rb
opal-0.3.31 core/nil_class.rb
opal-0.3.30 core/nil_class.rb
opal-0.3.29 core/nil_class.rb
opal-0.3.28 core/nil_class.rb
opal-0.3.27 core/nil_class.rb