summaryrefslogtreecommitdiff
path: root/lib/pry/commands
diff options
context:
space:
mode:
authorKyrylo Silin <silin@kyrylo.org>2019-03-02 02:00:34 +0200
committerKyrylo Silin <silin@kyrylo.org>2019-03-02 11:03:54 +0200
commit8ea5b6e0aa3405ee157aa1c7756a5619324d1bfd (patch)
tree8157c1b12a530712c553e53da146096ca1355a70 /lib/pry/commands
parent501e949921bb7d06c9f7a5c193976dac92ec8164 (diff)
downloadpry-8ea5b6e0aa3405ee157aa1c7756a5619324d1bfd.tar.gz
rubocop: fix offences of the Style/FormatString cop
Diffstat (limited to 'lib/pry/commands')
-rw-r--r--lib/pry/commands/gem_stats.rb5
-rw-r--r--lib/pry/commands/ls/local_vars.rb2
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/pry/commands/gem_stats.rb b/lib/pry/commands/gem_stats.rb
index 7d91be68..7dde0f6e 100644
--- a/lib/pry/commands/gem_stats.rb
+++ b/lib/pry/commands/gem_stats.rb
@@ -65,14 +65,15 @@ VVVVVVVVVVVVVVVVVVVVV
#{red('Dependencies')} (development)
%{ddependencies}
FORMAT
- format_str % {
+ format(
+ format_str,
name: green(h.name),
version: bold("v#{h.version}"),
downloads: h.downloads,
version_downloads: h.version_downloads,
rdependencies: format_dependencies(h.dependencies.runtime),
ddependencies: format_dependencies(h.dependencies.development)
- }
+ )
end
def format_dependencies(rdeps)
diff --git a/lib/pry/commands/ls/local_vars.rb b/lib/pry/commands/ls/local_vars.rb
index 9b1e14e0..5bdd66b1 100644
--- a/lib/pry/commands/ls/local_vars.rb
+++ b/lib/pry/commands/ls/local_vars.rb
@@ -31,7 +31,7 @@ class Pry
colorized_lhs = color(:local_var, lhs)
color_escape_padding = colorized_lhs.size - lhs.size
pad = desired_width + color_escape_padding
- "%-#{pad}s = %s" % [color(:local_var, colorized_lhs), rhs]
+ Kernel.format("%-#{pad}s = %s", color(:local_var, colorized_lhs), rhs)
end
end
end