# File lib_core/rucy/document.rb, line 502
    def _mount(mount_map, document, path, mask=nil)
      if (path == '/') then
        path = ''
      end
      unless (mount_map.include? path) then
        mount_map[path] = {
          :document => nil,
          :mask_list => Array.new
        }
      end
      node = mount_map[path]

      if (mask) then
        if (node[:mask_list].find{|m, d| m == mask }) then
          raise "duplicated mount at #{path}:#{mask}."
        end
        node[:mask_list].unshift([ mask, document ])
      else
        if (node[:document]) then
          raise "duplicated mount at #{path}."
        end
        node[:document] = document
      end

      nil
    end