
require 'facets/core/module/rename'
require 'facets/core/module/redef'
require 'facets/core/module/remove'
require 'facets/core/module/nodef'
require 'facets/core/module/wrap'

class Module

  def revisal( &blk )
    base = self
    nm = Module.new { include base }
    nm.class_eval &blk
    nm
  end

end



#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#

=begin testing

  require 'test/unit'

  class TCModule < Test::Unit::TestCase
    module M
      def x ; 1 ; end
    end
    class C
      include M.revisal {
        rename :y, :x
      }
    end

    def test_001
      c = C.new
      assert_raises( NoMethodError ) { c.x }
      assert_equal( 1, c.y )
    end
  end

=end
