Sha256: 9f9e960d753800ed43d29b12310dcf327b1485da0529daff8de42f36217a20ff

Contents?: true

Size: 160 Bytes

Versions: 17

Compression:

Stored size: 160 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

17 entries across 17 versions & 1 rubygems

Version Path
facets-1.2.1 lib/facets/core/nilclass/op_cmp.rb
facets-1.3.0 lib/facets/core/nilclass/op_cmp.rb
facets-1.3.1 lib/facets/core/nilclass/op_cmp.rb
facets-1.3.2 lib/facets/core/nilclass/op_cmp.rb
facets-1.3.3 lib/facets/core/nilclass/op_cmp.rb
facets-1.4.0 lib/facets/core/nilclass/op_cmp.rb
facets-1.4.2 lib/facets/core/nilclass/op_cmp.rb
facets-1.4.1 lib/facets/core/nilclass/op_cmp.rb
facets-1.4.3 lib/facets/core/nilclass/op_cmp.rb
facets-1.4.4 lib/facets/core/nilclass/op_cmp.rb
facets-1.4.5 lib/facets/core/nilclass/op_cmp.rb
facets-1.7.38 lib/facets/core/nilclass/op_cmp.rb
facets-1.7.0 lib/facets/core/nilclass/op_cmp.rb
facets-1.7.30 lib/facets/core/nilclass/op_cmp.rb
facets-1.7.46 lib/facets/core/nilclass/op_cmp.rb
facets-1.8.0 lib/facets/core/nilclass/op_cmp.rb
facets-1.8.8 lib/facets/core/nilclass/op_cmp.rb