
module Kernel

  # Easy access to an object qua class, otherwise
  # known as the object's metaclass or singleton class.
  #
  # Yes, another one.

  def qua_class(&block)
    if block_given?
      (class << self; self; end).class_eval(&block)
    else
      (class << self; self; end)
    end
  end

end



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

  require 'test/unit'

  class TCKernel < Test::Unit::TestCase

    def test_qua_class
      o = Object.new
      assert_equal( (class << o; self; end), o.qua_class )
    end

  end

=end

