diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2e7bb274..b7632c75 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -13,14 +13,6 @@ Gemspec/RequiredRubyVersion: Exclude: - 'pry.gemspec' -# Offense count: 3 -# Cop supports --auto-correct. -Layout/SpaceBeforeComma: - Exclude: - - 'lib/pry/commands/hist.rb' - - 'lib/pry/helpers/text.rb' - - 'spec/sticky_locals_spec.rb' - # Offense count: 5 # Cop supports --auto-correct. Layout/SpaceBeforeSemicolon: diff --git a/lib/pry/commands/hist.rb b/lib/pry/commands/hist.rb index 63bb4f93..c8c1371b 100644 --- a/lib/pry/commands/hist.rb +++ b/lib/pry/commands/hist.rb @@ -25,7 +25,7 @@ class Pry opt.on :T, :tail, "Display the last N items", optional_argument: true, as: Integer opt.on :s, :show, "Show the given range of lines", optional_argument: true, as: Range opt.on :G, :grep, "Show lines matching the given pattern", argument: true, as: String - opt.on :c, :clear , "Clear the current session's history" + opt.on :c, :clear, "Clear the current session's history" opt.on :r, :replay, "Replay a line or range of lines", argument: true, as: Range opt.on :save, "Save history to a file", argument: true, as: Range opt.on :e, :'exclude-pry', "Exclude Pry commands from the history" diff --git a/lib/pry/helpers/text.rb b/lib/pry/helpers/text.rb index 76be4c5a..765b8908 100644 --- a/lib/pry/helpers/text.rb +++ b/lib/pry/helpers/text.rb @@ -40,7 +40,7 @@ class Pry # @param [String, #to_s] text # @return [String] _text_ stripped of any color codes. def strip_color(text) - text.to_s.gsub(/(\001)?\e\[.*?(\d)+m(\002)?/ , '') + text.to_s.gsub(/(\001)?\e\[.*?(\d)+m(\002)?/, '') end # Returns _text_ as bold text for use on a terminal. diff --git a/spec/sticky_locals_spec.rb b/spec/sticky_locals_spec.rb index d90849cb..14cb2899 100644 --- a/spec/sticky_locals_spec.rb +++ b/spec/sticky_locals_spec.rb @@ -119,7 +119,7 @@ describe "Sticky locals (_file_ and friends)" do Pry.start( o, extra_sticky_locals: { - test_local1: :john , + test_local1: :john, test_local2: :carl } )