Sha256: c90697261840e8ae3316a0d2d75223e895a4e37d3748ce51ff3251b9f1e49011

Contents?: true

Size: 188 Bytes

Versions: 3

Compression:

Stored size: 188 Bytes

Contents

class NilClass
  # Allows <tt>nil</tt> to respond to #length.
  # Always returns <tt>0</tt>.
  #
  #  require 'facet/nil/length'
  #
  #  nil.length   #=> 0
  #
  def length; 0; end
end  

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
facets-0.7.0 lib/facet/nil/length.rb
facets-0.7.1 lib/facet/nil/length.rb
facets-0.7.2 lib/facet/nil/length.rb