Installs the gem dep_or_name and all its dependencies.
Returns an Array of installed gem specifications.

If the :prerelease option is set and there is a prerelease for
dep_or_name the prerelease version will be installed.

Unless explicitly specified as a prerelease dependency, prerelease gems
that dep_or_name depend on will not be installed.

If c-1.a depends on b-1 and a-1.a and there is a gem b-1.a available then
c-1.a, b-1 and a-1.a will be installed. b-1.a will need to be installed
separately.

# File rubygems/dependency_installer.rb, line 370definstalldep_or_name, version = Gem::Requirement.defaultrequest_set = resolve_dependenciesdep_or_name, version@installed_gems = []
options = {
:bin_dir=>@bin_dir,
:build_args=>@build_args,
:env_shebang=>@env_shebang,
:force=>@force,
:format_executable=>@format_executable,
:ignore_dependencies=>@ignore_dependencies,
:security_policy=>@security_policy,
:user_install=>@user_install,
:wrappers=>@wrappers,
:install_as_default=>@install_as_default
}
options[:install_dir] = @install_dirif@only_install_dirrequest_set.installoptionsdo|_, installer|@installed_gems<<installer.specifinstallerend@installed_gems.sort!# Since this is currently only called for docs, we can be lazy and just say# it's documentation. Ideally the hook adder could decide whether to be in# the background or not, and what to call it.in_background"Installing documentation"doGem.done_installing_hooks.eachdo|hook|hook.callself, @installed_gemsendendunlessGem.done_installing_hooks.empty?@installed_gemsend