
class NilClass

  # Allows <tt>nil</tt> to respond to #size.
  # Always returns <tt>0</tt>.
  #
  #  nil.size   #=> 0
  #
  def size; 0; end

  # Allows <tt>nil</tt> to respond to #length.
  # Always returns <tt>0</tt>.
  #
  #  nil.length   #=> 0
  #
  def length; 0; end

end



#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
=begin test

  require 'test/unit'

  class TC_NilClass < Test::Unit::TestCase

    def test_length
      assert_equal( 0, nil.length )
    end

    def test_size
      assert_equal( 0, nil.size )
    end

  end

=end
