class Bundler::Runtime

def require(*groups)

def require(*groups)
  groups.map! { |g| g.to_sym }
  groups = [:default] if groups.empty?
  @definition.dependencies.each do |dep|
    # Skip the dependency if it is not in any of the requested
    # groups
    next unless ((dep.groups & groups).any? && dep.current_platform?)
    required_file = nil
    begin
      # Loop through all the specified autorequires for the
      # dependency. If there are none, use the dependency's name
      # as the autorequire.
      Array(dep.autorequire || dep.name).each do |file|
        # Allow `require: true` as an alias for `require: <name>`
        file = dep.name if file == true
        required_file = file
        Kernel.require file
      end
    rescue LoadError => e
      REGEXPS.find { |r| r =~ e.message }
      raise if dep.autorequire || $1 != required_file
      if dep.autorequire.nil? && dep.name.include?('-')
        begin
          namespaced_file = dep.name.gsub('-', '/')
          Kernel.require namespaced_file
        rescue LoadError
          REGEXPS.find { |r| r =~ e.message }
          regex_name = $1
          raise e if dep.autorequire || (regex_name && regex_name.gsub('-', '/') != namespaced_file)
          raise e if regex_name.nil?
        end
      end
    end
  end
end