Rubygem: fix raising of CommandError for #install

Fix issue #870 (gem-install seems broken on jruby)
This commit is contained in:
Kyrylo Silin 2013-03-06 09:19:41 +02:00
parent 6b11eda3ad
commit 629bb75cc6
1 changed files with 2 additions and 2 deletions

View File

@ -69,10 +69,10 @@ class Pry
installer.install(name)
rescue Errno::EACCES
raise CommandError,
"Insufficient permissions to install #{ text.green(name) }."
"Insufficient permissions to install #{ Pry::Helpers::Text.green(name) }."
rescue Gem::GemNotFoundException
raise CommandError,
"Gem #{ text.green(name) } not found. Aborting installation."
"Gem #{ Pry::Helpers::Text.green(name) } not found. Aborting installation."
else
Gem.refresh
end