1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Fix for NoMethodError when using install-command with no gem configuration

This commit is contained in:
Andrew Lee 2014-08-24 23:08:03 -07:00
parent 6d5eb0831b
commit e41f828f30

View file

@ -57,7 +57,8 @@ class Pry
# @param [String] name
# @return [void]
def install(name)
gemrc_opts = Gem.configuration['gem'].split(' ')
require 'rubygems/dependency_installer'
gemrc_opts = (Gem.configuration['gem']||'').split(' ')
destination = if gemrc_opts.include?('--user-install')
Gem.user_dir
elsif File.writable?(Gem.dir)