
require 'facets/core/gem/self/active'

module Gem

  def self.gempath(gemname, subdir=nil)
    if active?(gemname)
      if subdir
        File.join( @loaded_specs[gemname].full_gem_path, subdir )
      else
        @loaded_specs[gemname].full_gem_path
      end
    end
  end

end
