summaryrefslogtreecommitdiff
path: root/lib/pry/commands/gem_stats.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pry/commands/gem_stats.rb')
-rw-r--r--lib/pry/commands/gem_stats.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/pry/commands/gem_stats.rb b/lib/pry/commands/gem_stats.rb
index c652ba0a..14e7c9f4 100644
--- a/lib/pry/commands/gem_stats.rb
+++ b/lib/pry/commands/gem_stats.rb
@@ -71,11 +71,13 @@ FAILWHALE
end
def format_dependencies(rdeps)
- rdeps.empty? ?
- bold("None") :
- with_line_numbers(rdeps.map {|h|
- "%{name} (%{requirements})" % {name: h["name"], requirements: h["requirements"]}
- }.join($/), 1, :bold)
+ return bold('None') if rdeps.empty?
+
+ with_line_numbers(
+ rdeps.map { |h| "#{h['name']} (#{h['requirements']})" }.join("\n"),
+ 1,
+ :bold
+ )
end
Pry::Commands.add_command(self)
end