Sha256: f4160c5a273744b2b0084137e81730fdb3f444421fa45da7139a5c719c7e3f7e

Contents?: true

Size: 163 Bytes

Versions: 4

Compression:

Stored size: 163 Bytes

Contents

class NilClass

  # Any comparison against nil with return -1,
  # except for nil itself which returns 0.

  def <=>( other )
    other.nil? ? 0 : -1
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
facets-1.8.49 lib/facets/core/nilclass/op_cmp.rb
facets-1.8.20 lib/facets/core/nilclass/op_cmp.rb
facets-1.8.51 lib/facets/core/nilclass/op_cmp.rb
facets-1.8.54 lib/facets/core/nilclass/op_cmp.rb