
module Kernel

  # Access to an object's "special" class, otherwise
  # known as it's eigenclass or metaclass or own, etc.
  #
  # One day these names must be reconciled!

  def singleton_class
    (class << self; self; end)
  end
  alias_method :__singleton_class__, :singleton_class

end


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

  require 'test/unit'

  class TCKernel < Test::Unit::TestCase

    def test_singleton
      o = Object.new
      assert_equal( (class << o; self; end), o.singleton_class )
    end

  end

=end
