From 8c3ebd5596c84b58d2a9b32a7f309c15ecb15da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Mon, 1 Jan 2018 19:42:49 -0300 Subject: [PATCH] Frozen string literal support --- .rubocop.yml | 4 ++++ Gemfile | 2 ++ Rakefile | 2 ++ bin/byebug | 1 + byebug.gemspec | 2 ++ ext/byebug/extconf.rb | 2 ++ lib/byebug.rb | 2 ++ lib/byebug/attacher.rb | 2 ++ lib/byebug/breakpoint.rb | 2 ++ lib/byebug/command.rb | 2 ++ lib/byebug/command_list.rb | 2 ++ lib/byebug/commands.rb | 2 ++ lib/byebug/commands/break.rb | 2 ++ lib/byebug/commands/catch.rb | 2 ++ lib/byebug/commands/condition.rb | 2 ++ lib/byebug/commands/continue.rb | 2 ++ lib/byebug/commands/debug.rb | 2 ++ lib/byebug/commands/delete.rb | 2 ++ lib/byebug/commands/disable.rb | 2 ++ lib/byebug/commands/disable/breakpoints.rb | 2 ++ lib/byebug/commands/disable/display.rb | 2 ++ lib/byebug/commands/display.rb | 2 ++ lib/byebug/commands/down.rb | 2 ++ lib/byebug/commands/edit.rb | 2 ++ lib/byebug/commands/enable.rb | 2 ++ lib/byebug/commands/enable/breakpoints.rb | 2 ++ lib/byebug/commands/enable/display.rb | 2 ++ lib/byebug/commands/finish.rb | 2 ++ lib/byebug/commands/frame.rb | 2 ++ lib/byebug/commands/help.rb | 2 ++ lib/byebug/commands/history.rb | 2 ++ lib/byebug/commands/info.rb | 2 ++ lib/byebug/commands/info/breakpoints.rb | 2 ++ lib/byebug/commands/info/display.rb | 2 ++ lib/byebug/commands/info/file.rb | 2 ++ lib/byebug/commands/info/line.rb | 2 ++ lib/byebug/commands/info/program.rb | 2 ++ lib/byebug/commands/interrupt.rb | 2 ++ lib/byebug/commands/irb.rb | 2 ++ lib/byebug/commands/kill.rb | 2 ++ lib/byebug/commands/list.rb | 2 ++ lib/byebug/commands/method.rb | 2 ++ lib/byebug/commands/next.rb | 2 ++ lib/byebug/commands/pry.rb | 2 ++ lib/byebug/commands/quit.rb | 2 ++ lib/byebug/commands/restart.rb | 2 ++ lib/byebug/commands/save.rb | 2 ++ lib/byebug/commands/set.rb | 2 ++ lib/byebug/commands/show.rb | 2 ++ lib/byebug/commands/source.rb | 2 ++ lib/byebug/commands/step.rb | 2 ++ lib/byebug/commands/thread.rb | 2 ++ lib/byebug/commands/thread/current.rb | 2 ++ lib/byebug/commands/thread/list.rb | 2 ++ lib/byebug/commands/thread/resume.rb | 2 ++ lib/byebug/commands/thread/stop.rb | 2 ++ lib/byebug/commands/thread/switch.rb | 2 ++ lib/byebug/commands/tracevar.rb | 2 ++ lib/byebug/commands/undisplay.rb | 2 ++ lib/byebug/commands/untracevar.rb | 2 ++ lib/byebug/commands/up.rb | 2 ++ lib/byebug/commands/var.rb | 2 ++ lib/byebug/commands/var/all.rb | 2 ++ lib/byebug/commands/var/args.rb | 2 ++ lib/byebug/commands/var/const.rb | 2 ++ lib/byebug/commands/var/global.rb | 2 ++ lib/byebug/commands/var/instance.rb | 2 ++ lib/byebug/commands/var/local.rb | 2 ++ lib/byebug/commands/where.rb | 2 ++ lib/byebug/context.rb | 2 ++ lib/byebug/core.rb | 2 ++ lib/byebug/errors.rb | 2 ++ lib/byebug/frame.rb | 2 ++ lib/byebug/helpers/bin.rb | 2 ++ lib/byebug/helpers/eval.rb | 2 ++ lib/byebug/helpers/file.rb | 2 ++ lib/byebug/helpers/frame.rb | 2 ++ lib/byebug/helpers/parse.rb | 2 ++ lib/byebug/helpers/path.rb | 2 ++ lib/byebug/helpers/reflection.rb | 2 ++ lib/byebug/helpers/string.rb | 2 ++ lib/byebug/helpers/thread.rb | 2 ++ lib/byebug/helpers/toggle.rb | 2 ++ lib/byebug/helpers/var.rb | 2 ++ lib/byebug/history.rb | 2 ++ lib/byebug/interface.rb | 2 ++ lib/byebug/interfaces/remote_interface.rb | 2 ++ lib/byebug/interfaces/script_interface.rb | 2 ++ lib/byebug/interfaces/test_interface.rb | 2 ++ lib/byebug/option_setter.rb | 2 ++ lib/byebug/printers/plain.rb | 2 ++ lib/byebug/processors/command_processor.rb | 2 ++ lib/byebug/processors/control_processor.rb | 2 ++ lib/byebug/processors/post_mortem_processor.rb | 2 ++ lib/byebug/processors/script_processor.rb | 2 ++ lib/byebug/remote.rb | 2 ++ lib/byebug/runner.rb | 2 ++ lib/byebug/setting.rb | 4 +++- lib/byebug/settings/autoirb.rb | 2 ++ lib/byebug/settings/autolist.rb | 2 ++ lib/byebug/settings/autopry.rb | 2 ++ lib/byebug/settings/autosave.rb | 2 ++ lib/byebug/settings/basename.rb | 2 ++ lib/byebug/settings/fullpath.rb | 2 ++ lib/byebug/settings/histfile.rb | 2 ++ lib/byebug/settings/histsize.rb | 2 ++ lib/byebug/settings/linetrace.rb | 2 ++ lib/byebug/settings/listsize.rb | 2 ++ lib/byebug/settings/post_mortem.rb | 2 ++ lib/byebug/settings/savefile.rb | 2 ++ lib/byebug/settings/stack_on_error.rb | 2 ++ lib/byebug/settings/width.rb | 2 ++ lib/byebug/subcommands.rb | 2 ++ script/minitest_runner.rb | 1 + test/commands/break_test.rb | 4 +++- test/commands/catch_test.rb | 2 ++ test/commands/condition_test.rb | 2 ++ test/commands/continue_test.rb | 2 ++ test/commands/debug_test.rb | 2 ++ test/commands/delete_test.rb | 2 ++ test/commands/disable_test.rb | 2 ++ test/commands/display_test.rb | 2 ++ test/commands/down_test.rb | 2 ++ test/commands/edit_test.rb | 2 ++ test/commands/enable_test.rb | 2 ++ test/commands/finish_test.rb | 2 ++ test/commands/frame_test.rb | 2 ++ test/commands/help_test.rb | 2 ++ test/commands/history_test.rb | 2 ++ test/commands/info_test.rb | 2 ++ test/commands/interrupt_test.rb | 2 ++ test/commands/irb_test.rb | 2 ++ test/commands/kill_test.rb | 2 ++ test/commands/list_test.rb | 2 ++ test/commands/method_test.rb | 2 ++ test/commands/next_test.rb | 2 ++ test/commands/pry_test.rb | 2 ++ test/commands/quit_test.rb | 2 ++ test/commands/restart_test.rb | 2 ++ test/commands/save_test.rb | 2 ++ test/commands/set_test.rb | 2 ++ test/commands/show_test.rb | 2 ++ test/commands/source_test.rb | 2 ++ test/commands/step_test.rb | 2 ++ test/commands/thread_test.rb | 2 ++ test/commands/tracevar_test.rb | 2 ++ test/commands/undisplay_test.rb | 2 ++ test/commands/up_test.rb | 2 ++ test/commands/var_test.rb | 2 ++ test/commands/where_test.rb | 2 ++ test/debugger_alias_test.rb | 2 ++ test/interface_test.rb | 2 ++ test/interfaces/local_interface_test.rb | 2 ++ test/interfaces/script_interface_test.rb | 2 ++ test/post_mortem_test.rb | 2 ++ test/printers/plain_test.rb | 2 ++ test/processors/command_processor_test.rb | 2 ++ test/processors/script_processor_test.rb | 2 ++ test/rc_test.rb | 2 ++ test/runner_test.rb | 2 ++ test/support/assertions.rb | 2 ++ test/support/coverage.rb | 2 ++ test/support/matchers.rb | 2 ++ test/support/temporary.rb | 2 ++ test/support/test_case.rb | 2 ++ test/support/utils.rb | 2 ++ test/test_helper.rb | 2 ++ 167 files changed, 336 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index ebad58e6d..2b4a83546 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -28,6 +28,10 @@ Metrics/PerceivedComplexity: TrivialAccessors: ExactNameMatch: true +# Until we bump TargetRubyVersion to 2.3 +Style/FrozenStringLiteralComment: + EnforcedStyle: always + Style/ModuleFunction: EnforcedStyle: extend_self diff --git a/Gemfile b/Gemfile index af1a6738d..7538a55d3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source "https://rubygems.org" gemspec diff --git a/Rakefile b/Rakefile index 790a884d7..f3f307ab3 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "bundler/gem_tasks" require "chandler/tasks" require "rake/extensiontask" diff --git a/bin/byebug b/bin/byebug index b5650dfb0..e52ede8d4 100755 --- a/bin/byebug +++ b/bin/byebug @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true $LOAD_PATH.unshift(File.expand_path(File.join("..", "lib"), __dir__)) diff --git a/byebug.gemspec b/byebug.gemspec index 141f15208..78cc03440 100644 --- a/byebug.gemspec +++ b/byebug.gemspec @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.join(__dir__, "lib", "byebug", "version") Gem::Specification.new do |s| diff --git a/ext/byebug/extconf.rb b/ext/byebug/extconf.rb index 975206bec..057552e29 100644 --- a/ext/byebug/extconf.rb +++ b/ext/byebug/extconf.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "mkmf" makefile_config = RbConfig::MAKEFILE_CONFIG diff --git a/lib/byebug.rb b/lib/byebug.rb index e18be7562..f46fdd2b8 100644 --- a/lib/byebug.rb +++ b/lib/byebug.rb @@ -1 +1,3 @@ +# frozen_string_literal: true + require "byebug/attacher" diff --git a/lib/byebug/attacher.rb b/lib/byebug/attacher.rb index 0a4b97b8e..6e0a67353 100644 --- a/lib/byebug/attacher.rb +++ b/lib/byebug/attacher.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # # Main Container for all of Byebug's code # diff --git a/lib/byebug/breakpoint.rb b/lib/byebug/breakpoint.rb index 784f3f2e2..b7dd30e31 100644 --- a/lib/byebug/breakpoint.rb +++ b/lib/byebug/breakpoint.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug # # Implements breakpoints diff --git a/lib/byebug/command.rb b/lib/byebug/command.rb index ce20a54ce..4a00ae369 100644 --- a/lib/byebug/command.rb +++ b/lib/byebug/command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "forwardable" require "byebug/helpers/string" diff --git a/lib/byebug/command_list.rb b/lib/byebug/command_list.rb index 4ae2c26cf..f19bda2c4 100644 --- a/lib/byebug/command_list.rb +++ b/lib/byebug/command_list.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/errors" module Byebug diff --git a/lib/byebug/commands.rb b/lib/byebug/commands.rb index b733b090f..b0968e2a9 100644 --- a/lib/byebug/commands.rb +++ b/lib/byebug/commands.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/commands/break" require "byebug/commands/catch" require "byebug/commands/condition" diff --git a/lib/byebug/commands/break.rb b/lib/byebug/commands/break.rb index 05255cb0d..64c114a24 100644 --- a/lib/byebug/commands/break.rb +++ b/lib/byebug/commands/break.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/eval" require "byebug/helpers/file" diff --git a/lib/byebug/commands/catch.rb b/lib/byebug/commands/catch.rb index 963928a4c..0b1d7d9db 100644 --- a/lib/byebug/commands/catch.rb +++ b/lib/byebug/commands/catch.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/eval" diff --git a/lib/byebug/commands/condition.rb b/lib/byebug/commands/condition.rb index 64f822bd5..1b0e45885 100644 --- a/lib/byebug/commands/condition.rb +++ b/lib/byebug/commands/condition.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/parse" diff --git a/lib/byebug/commands/continue.rb b/lib/byebug/commands/continue.rb index 4438a5acb..33d9b30c7 100644 --- a/lib/byebug/commands/continue.rb +++ b/lib/byebug/commands/continue.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/parse" diff --git a/lib/byebug/commands/debug.rb b/lib/byebug/commands/debug.rb index f950bf068..0dcaf6965 100644 --- a/lib/byebug/commands/debug.rb +++ b/lib/byebug/commands/debug.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/eval" diff --git a/lib/byebug/commands/delete.rb b/lib/byebug/commands/delete.rb index 87044a155..d7a3591cd 100644 --- a/lib/byebug/commands/delete.rb +++ b/lib/byebug/commands/delete.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/parse" diff --git a/lib/byebug/commands/disable.rb b/lib/byebug/commands/disable.rb index 4051bcefc..4db1976e9 100644 --- a/lib/byebug/commands/disable.rb +++ b/lib/byebug/commands/disable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/subcommands" require "byebug/commands/disable/breakpoints" diff --git a/lib/byebug/commands/disable/breakpoints.rb b/lib/byebug/commands/disable/breakpoints.rb index 45b4fe6c4..c3b530074 100644 --- a/lib/byebug/commands/disable/breakpoints.rb +++ b/lib/byebug/commands/disable/breakpoints.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/toggle" module Byebug diff --git a/lib/byebug/commands/disable/display.rb b/lib/byebug/commands/disable/display.rb index bd4c86263..3b784e15e 100644 --- a/lib/byebug/commands/disable/display.rb +++ b/lib/byebug/commands/disable/display.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/toggle" module Byebug diff --git a/lib/byebug/commands/display.rb b/lib/byebug/commands/display.rb index 1986b5c17..7a03c5ec5 100644 --- a/lib/byebug/commands/display.rb +++ b/lib/byebug/commands/display.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/eval" diff --git a/lib/byebug/commands/down.rb b/lib/byebug/commands/down.rb index 81787d3af..1c2c04323 100644 --- a/lib/byebug/commands/down.rb +++ b/lib/byebug/commands/down.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "pathname" require "byebug/command" require "byebug/helpers/frame" diff --git a/lib/byebug/commands/edit.rb b/lib/byebug/commands/edit.rb index cbdfb0862..6f50d50f2 100644 --- a/lib/byebug/commands/edit.rb +++ b/lib/byebug/commands/edit.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" module Byebug diff --git a/lib/byebug/commands/enable.rb b/lib/byebug/commands/enable.rb index 5398cd5e6..5a3b11ef6 100644 --- a/lib/byebug/commands/enable.rb +++ b/lib/byebug/commands/enable.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/subcommands" require "byebug/commands/enable/breakpoints" diff --git a/lib/byebug/commands/enable/breakpoints.rb b/lib/byebug/commands/enable/breakpoints.rb index 560863311..a57465f54 100644 --- a/lib/byebug/commands/enable/breakpoints.rb +++ b/lib/byebug/commands/enable/breakpoints.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/toggle" module Byebug diff --git a/lib/byebug/commands/enable/display.rb b/lib/byebug/commands/enable/display.rb index f710a4979..1ba2146bd 100644 --- a/lib/byebug/commands/enable/display.rb +++ b/lib/byebug/commands/enable/display.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/toggle" module Byebug diff --git a/lib/byebug/commands/finish.rb b/lib/byebug/commands/finish.rb index 1d1efee50..1b5411bf1 100644 --- a/lib/byebug/commands/finish.rb +++ b/lib/byebug/commands/finish.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/parse" diff --git a/lib/byebug/commands/frame.rb b/lib/byebug/commands/frame.rb index 62872ab0d..40533957c 100644 --- a/lib/byebug/commands/frame.rb +++ b/lib/byebug/commands/frame.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "pathname" require "byebug/command" require "byebug/helpers/frame" diff --git a/lib/byebug/commands/help.rb b/lib/byebug/commands/help.rb index f6877fe18..18bc44930 100644 --- a/lib/byebug/commands/help.rb +++ b/lib/byebug/commands/help.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/errors" diff --git a/lib/byebug/commands/history.rb b/lib/byebug/commands/history.rb index 26e7ddba5..abd4da69c 100644 --- a/lib/byebug/commands/history.rb +++ b/lib/byebug/commands/history.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/parse" diff --git a/lib/byebug/commands/info.rb b/lib/byebug/commands/info.rb index c0c669ed3..e895b828d 100644 --- a/lib/byebug/commands/info.rb +++ b/lib/byebug/commands/info.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/subcommands" require "byebug/commands/info/breakpoints" diff --git a/lib/byebug/commands/info/breakpoints.rb b/lib/byebug/commands/info/breakpoints.rb index bf91a94d1..058e9ffc2 100644 --- a/lib/byebug/commands/info/breakpoints.rb +++ b/lib/byebug/commands/info/breakpoints.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug # # Reopens the +info+ command to define the +breakpoints+ subcommand diff --git a/lib/byebug/commands/info/display.rb b/lib/byebug/commands/info/display.rb index 379962a90..c6c36b608 100644 --- a/lib/byebug/commands/info/display.rb +++ b/lib/byebug/commands/info/display.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug # # Reopens the +info+ command to define the +display+ subcommand diff --git a/lib/byebug/commands/info/file.rb b/lib/byebug/commands/info/file.rb index f1f9913e3..b23bfb8ce 100644 --- a/lib/byebug/commands/info/file.rb +++ b/lib/byebug/commands/info/file.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/file" module Byebug diff --git a/lib/byebug/commands/info/line.rb b/lib/byebug/commands/info/line.rb index 44404232d..f32bc1505 100644 --- a/lib/byebug/commands/info/line.rb +++ b/lib/byebug/commands/info/line.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug # # Reopens the +info+ command to define the +line+ subcommand diff --git a/lib/byebug/commands/info/program.rb b/lib/byebug/commands/info/program.rb index 44c5db2e3..1b65486ab 100644 --- a/lib/byebug/commands/info/program.rb +++ b/lib/byebug/commands/info/program.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug # # Reopens the +info+ command to define the +args+ subcommand diff --git a/lib/byebug/commands/interrupt.rb b/lib/byebug/commands/interrupt.rb index bb03d0afc..97fdd53ad 100644 --- a/lib/byebug/commands/interrupt.rb +++ b/lib/byebug/commands/interrupt.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" module Byebug diff --git a/lib/byebug/commands/irb.rb b/lib/byebug/commands/irb.rb index c83f3d2ca..812703784 100644 --- a/lib/byebug/commands/irb.rb +++ b/lib/byebug/commands/irb.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "irb" require "English" diff --git a/lib/byebug/commands/kill.rb b/lib/byebug/commands/kill.rb index 1ed77e9f8..1abfdf648 100644 --- a/lib/byebug/commands/kill.rb +++ b/lib/byebug/commands/kill.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" module Byebug diff --git a/lib/byebug/commands/list.rb b/lib/byebug/commands/list.rb index 3ac90171e..febcab030 100644 --- a/lib/byebug/commands/list.rb +++ b/lib/byebug/commands/list.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/source_file_formatter" require "byebug/helpers/file" diff --git a/lib/byebug/commands/method.rb b/lib/byebug/commands/method.rb index 88ccf4317..f2b2d1567 100644 --- a/lib/byebug/commands/method.rb +++ b/lib/byebug/commands/method.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/eval" diff --git a/lib/byebug/commands/next.rb b/lib/byebug/commands/next.rb index 0926a58c9..10df0cf91 100644 --- a/lib/byebug/commands/next.rb +++ b/lib/byebug/commands/next.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/parse" diff --git a/lib/byebug/commands/pry.rb b/lib/byebug/commands/pry.rb index 718466951..0d7440a3c 100644 --- a/lib/byebug/commands/pry.rb +++ b/lib/byebug/commands/pry.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/eval" diff --git a/lib/byebug/commands/quit.rb b/lib/byebug/commands/quit.rb index be7ac72f5..12f303499 100644 --- a/lib/byebug/commands/quit.rb +++ b/lib/byebug/commands/quit.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" module Byebug diff --git a/lib/byebug/commands/restart.rb b/lib/byebug/commands/restart.rb index 4f43af8c2..8506e92a2 100644 --- a/lib/byebug/commands/restart.rb +++ b/lib/byebug/commands/restart.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/bin" require "byebug/helpers/path" diff --git a/lib/byebug/commands/save.rb b/lib/byebug/commands/save.rb index 3f91f82ae..bf1ad1c36 100644 --- a/lib/byebug/commands/save.rb +++ b/lib/byebug/commands/save.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" module Byebug diff --git a/lib/byebug/commands/set.rb b/lib/byebug/commands/set.rb index 8eb043c52..18dfa175e 100644 --- a/lib/byebug/commands/set.rb +++ b/lib/byebug/commands/set.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/parse" diff --git a/lib/byebug/commands/show.rb b/lib/byebug/commands/show.rb index 6364e3fa1..987e47af9 100644 --- a/lib/byebug/commands/show.rb +++ b/lib/byebug/commands/show.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" module Byebug diff --git a/lib/byebug/commands/source.rb b/lib/byebug/commands/source.rb index 1e683160e..96a85fca1 100644 --- a/lib/byebug/commands/source.rb +++ b/lib/byebug/commands/source.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" module Byebug diff --git a/lib/byebug/commands/step.rb b/lib/byebug/commands/step.rb index ab6b248fd..3a287116a 100644 --- a/lib/byebug/commands/step.rb +++ b/lib/byebug/commands/step.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/parse" diff --git a/lib/byebug/commands/thread.rb b/lib/byebug/commands/thread.rb index 263775d40..f93fe66dc 100644 --- a/lib/byebug/commands/thread.rb +++ b/lib/byebug/commands/thread.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/subcommands" require "byebug/commands/thread/current" diff --git a/lib/byebug/commands/thread/current.rb b/lib/byebug/commands/thread/current.rb index 38f93eb70..532b41bea 100644 --- a/lib/byebug/commands/thread/current.rb +++ b/lib/byebug/commands/thread/current.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/thread" module Byebug diff --git a/lib/byebug/commands/thread/list.rb b/lib/byebug/commands/thread/list.rb index eae1b4337..06b97e6c5 100644 --- a/lib/byebug/commands/thread/list.rb +++ b/lib/byebug/commands/thread/list.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/thread" module Byebug diff --git a/lib/byebug/commands/thread/resume.rb b/lib/byebug/commands/thread/resume.rb index 2ee79b58e..70a3be9c6 100644 --- a/lib/byebug/commands/thread/resume.rb +++ b/lib/byebug/commands/thread/resume.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/thread" module Byebug diff --git a/lib/byebug/commands/thread/stop.rb b/lib/byebug/commands/thread/stop.rb index 8f5a6acab..1fb1223fd 100644 --- a/lib/byebug/commands/thread/stop.rb +++ b/lib/byebug/commands/thread/stop.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/thread" module Byebug diff --git a/lib/byebug/commands/thread/switch.rb b/lib/byebug/commands/thread/switch.rb index 01e49d080..616487479 100644 --- a/lib/byebug/commands/thread/switch.rb +++ b/lib/byebug/commands/thread/switch.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/thread" module Byebug diff --git a/lib/byebug/commands/tracevar.rb b/lib/byebug/commands/tracevar.rb index 1badbaa14..e2298c910 100644 --- a/lib/byebug/commands/tracevar.rb +++ b/lib/byebug/commands/tracevar.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" module Byebug diff --git a/lib/byebug/commands/undisplay.rb b/lib/byebug/commands/undisplay.rb index 0d1d31f72..6cb6e8680 100644 --- a/lib/byebug/commands/undisplay.rb +++ b/lib/byebug/commands/undisplay.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" require "byebug/helpers/parse" diff --git a/lib/byebug/commands/untracevar.rb b/lib/byebug/commands/untracevar.rb index 4c6e8e1bb..77e6dc299 100644 --- a/lib/byebug/commands/untracevar.rb +++ b/lib/byebug/commands/untracevar.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/command" module Byebug diff --git a/lib/byebug/commands/up.rb b/lib/byebug/commands/up.rb index b84e76ac4..c6d2c0bc4 100644 --- a/lib/byebug/commands/up.rb +++ b/lib/byebug/commands/up.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "pathname" require "byebug/command" require "byebug/helpers/frame" diff --git a/lib/byebug/commands/var.rb b/lib/byebug/commands/var.rb index d1204a621..aed74df4b 100644 --- a/lib/byebug/commands/var.rb +++ b/lib/byebug/commands/var.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/subcommands" require "byebug/commands/var/all" diff --git a/lib/byebug/commands/var/all.rb b/lib/byebug/commands/var/all.rb index f0c197717..8e84ff555 100644 --- a/lib/byebug/commands/var/all.rb +++ b/lib/byebug/commands/var/all.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/var" module Byebug diff --git a/lib/byebug/commands/var/args.rb b/lib/byebug/commands/var/args.rb index 962b331f4..191e4a8a1 100644 --- a/lib/byebug/commands/var/args.rb +++ b/lib/byebug/commands/var/args.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/var" module Byebug diff --git a/lib/byebug/commands/var/const.rb b/lib/byebug/commands/var/const.rb index 5aec9fda4..1682da6b9 100644 --- a/lib/byebug/commands/var/const.rb +++ b/lib/byebug/commands/var/const.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/eval" module Byebug diff --git a/lib/byebug/commands/var/global.rb b/lib/byebug/commands/var/global.rb index 6bd9faffa..fb28bd284 100644 --- a/lib/byebug/commands/var/global.rb +++ b/lib/byebug/commands/var/global.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug # # Reopens the +var+ command to define the +global+ subcommand diff --git a/lib/byebug/commands/var/instance.rb b/lib/byebug/commands/var/instance.rb index 0621ad0c9..7b55f4af0 100644 --- a/lib/byebug/commands/var/instance.rb +++ b/lib/byebug/commands/var/instance.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/var" module Byebug diff --git a/lib/byebug/commands/var/local.rb b/lib/byebug/commands/var/local.rb index fb5170d96..8d8bbcf75 100644 --- a/lib/byebug/commands/var/local.rb +++ b/lib/byebug/commands/var/local.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/var" module Byebug diff --git a/lib/byebug/commands/where.rb b/lib/byebug/commands/where.rb index 029bbbb7a..bcb7948b4 100644 --- a/lib/byebug/commands/where.rb +++ b/lib/byebug/commands/where.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "pathname" require "byebug/command" require "byebug/helpers/frame" diff --git a/lib/byebug/context.rb b/lib/byebug/context.rb index f48b966b2..b993b420f 100644 --- a/lib/byebug/context.rb +++ b/lib/byebug/context.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/frame" require "byebug/helpers/path" require "byebug/helpers/file" diff --git a/lib/byebug/core.rb b/lib/byebug/core.rb index 4924110fc..b2884d215 100644 --- a/lib/byebug/core.rb +++ b/lib/byebug/core.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/reflection" require "byebug/byebug" require "byebug/context" diff --git a/lib/byebug/errors.rb b/lib/byebug/errors.rb index 37c2ea26e..01ee4f4d8 100644 --- a/lib/byebug/errors.rb +++ b/lib/byebug/errors.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug # # Custom exception exception to signal "command not found" errors diff --git a/lib/byebug/frame.rb b/lib/byebug/frame.rb index cacb713e3..fbe818639 100644 --- a/lib/byebug/frame.rb +++ b/lib/byebug/frame.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/file" module Byebug diff --git a/lib/byebug/helpers/bin.rb b/lib/byebug/helpers/bin.rb index 9c94cbe1b..e68069517 100644 --- a/lib/byebug/helpers/bin.rb +++ b/lib/byebug/helpers/bin.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug module Helpers # diff --git a/lib/byebug/helpers/eval.rb b/lib/byebug/helpers/eval.rb index a8f1d0286..f545e57e4 100644 --- a/lib/byebug/helpers/eval.rb +++ b/lib/byebug/helpers/eval.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug module Helpers # diff --git a/lib/byebug/helpers/file.rb b/lib/byebug/helpers/file.rb index 9ad91c751..636b1e0fc 100644 --- a/lib/byebug/helpers/file.rb +++ b/lib/byebug/helpers/file.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug module Helpers # diff --git a/lib/byebug/helpers/frame.rb b/lib/byebug/helpers/frame.rb index b16d3211e..fa5543177 100644 --- a/lib/byebug/helpers/frame.rb +++ b/lib/byebug/helpers/frame.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug module Helpers # diff --git a/lib/byebug/helpers/parse.rb b/lib/byebug/helpers/parse.rb index fc1876b43..a241bc988 100644 --- a/lib/byebug/helpers/parse.rb +++ b/lib/byebug/helpers/parse.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug module Helpers # diff --git a/lib/byebug/helpers/path.rb b/lib/byebug/helpers/path.rb index 543aa1101..eaed83b16 100644 --- a/lib/byebug/helpers/path.rb +++ b/lib/byebug/helpers/path.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug module Helpers # diff --git a/lib/byebug/helpers/reflection.rb b/lib/byebug/helpers/reflection.rb index 2a24ce1fa..ceb8fb48e 100644 --- a/lib/byebug/helpers/reflection.rb +++ b/lib/byebug/helpers/reflection.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug module Helpers # diff --git a/lib/byebug/helpers/string.rb b/lib/byebug/helpers/string.rb index c5808588e..6d6c601d3 100644 --- a/lib/byebug/helpers/string.rb +++ b/lib/byebug/helpers/string.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug module Helpers # diff --git a/lib/byebug/helpers/thread.rb b/lib/byebug/helpers/thread.rb index ac85eb6cb..02c9f8e8b 100644 --- a/lib/byebug/helpers/thread.rb +++ b/lib/byebug/helpers/thread.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug module Helpers # diff --git a/lib/byebug/helpers/toggle.rb b/lib/byebug/helpers/toggle.rb index c9ecb45c1..a81431f85 100644 --- a/lib/byebug/helpers/toggle.rb +++ b/lib/byebug/helpers/toggle.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/parse" module Byebug diff --git a/lib/byebug/helpers/var.rb b/lib/byebug/helpers/var.rb index 1b4693084..e6fc9e7b5 100644 --- a/lib/byebug/helpers/var.rb +++ b/lib/byebug/helpers/var.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/eval" module Byebug diff --git a/lib/byebug/history.rb b/lib/byebug/history.rb index de2d9ccfd..548f05fc1 100644 --- a/lib/byebug/history.rb +++ b/lib/byebug/history.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require "readline" rescue LoadError diff --git a/lib/byebug/interface.rb b/lib/byebug/interface.rb index 18243641d..c5fd7c64f 100644 --- a/lib/byebug/interface.rb +++ b/lib/byebug/interface.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/setting" require "byebug/history" require "byebug/helpers/file" diff --git a/lib/byebug/interfaces/remote_interface.rb b/lib/byebug/interfaces/remote_interface.rb index 5aa4824fb..cc5e00fbe 100644 --- a/lib/byebug/interfaces/remote_interface.rb +++ b/lib/byebug/interfaces/remote_interface.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/history" module Byebug diff --git a/lib/byebug/interfaces/script_interface.rb b/lib/byebug/interfaces/script_interface.rb index 032e36289..6c176c24b 100644 --- a/lib/byebug/interfaces/script_interface.rb +++ b/lib/byebug/interfaces/script_interface.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug # # Interface class for command execution from script files. diff --git a/lib/byebug/interfaces/test_interface.rb b/lib/byebug/interfaces/test_interface.rb index d30945735..d732d5f79 100644 --- a/lib/byebug/interfaces/test_interface.rb +++ b/lib/byebug/interfaces/test_interface.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug # # Custom interface for easier assertions diff --git a/lib/byebug/option_setter.rb b/lib/byebug/option_setter.rb index a0ab17149..d86537c3d 100644 --- a/lib/byebug/option_setter.rb +++ b/lib/byebug/option_setter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug # # Handles byebug's command line options diff --git a/lib/byebug/printers/plain.rb b/lib/byebug/printers/plain.rb index 6c0ab57f6..1c73af16c 100644 --- a/lib/byebug/printers/plain.rb +++ b/lib/byebug/printers/plain.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/printers/base" module Byebug diff --git a/lib/byebug/processors/command_processor.rb b/lib/byebug/processors/command_processor.rb index b6d421d9a..285eb8200 100644 --- a/lib/byebug/processors/command_processor.rb +++ b/lib/byebug/processors/command_processor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "forwardable" require "byebug/helpers/eval" diff --git a/lib/byebug/processors/control_processor.rb b/lib/byebug/processors/control_processor.rb index 429ebabd1..a20290c0d 100644 --- a/lib/byebug/processors/control_processor.rb +++ b/lib/byebug/processors/control_processor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/processors/command_processor" module Byebug diff --git a/lib/byebug/processors/post_mortem_processor.rb b/lib/byebug/processors/post_mortem_processor.rb index 52f4bffc3..5529b8781 100644 --- a/lib/byebug/processors/post_mortem_processor.rb +++ b/lib/byebug/processors/post_mortem_processor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/processors/command_processor" module Byebug diff --git a/lib/byebug/processors/script_processor.rb b/lib/byebug/processors/script_processor.rb index a730737fa..d6b34e78f 100644 --- a/lib/byebug/processors/script_processor.rb +++ b/lib/byebug/processors/script_processor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/processors/command_processor" module Byebug diff --git a/lib/byebug/remote.rb b/lib/byebug/remote.rb index 7eac67367..3bdcb43e4 100644 --- a/lib/byebug/remote.rb +++ b/lib/byebug/remote.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "socket" require "byebug/processors/control_processor" diff --git a/lib/byebug/runner.rb b/lib/byebug/runner.rb index dfef4238f..8c6d72fdf 100644 --- a/lib/byebug/runner.rb +++ b/lib/byebug/runner.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "optparse" require "English" require "byebug/core" diff --git a/lib/byebug/setting.rb b/lib/byebug/setting.rb index 4a9c78a37..d681004b5 100644 --- a/lib/byebug/setting.rb +++ b/lib/byebug/setting.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/helpers/string" module Byebug @@ -64,7 +66,7 @@ def help_all output = " List of supported settings:\n\n" width = settings.keys.max_by(&:size).size settings.each_value do |sett| - output << format( + output += format( " %-#{width}s -- %s\n", name: sett.to_sym, description: sett.banner diff --git a/lib/byebug/settings/autoirb.rb b/lib/byebug/settings/autoirb.rb index db11984d5..9df7aa47f 100644 --- a/lib/byebug/settings/autoirb.rb +++ b/lib/byebug/settings/autoirb.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/setting" require "byebug/commands/irb" diff --git a/lib/byebug/settings/autolist.rb b/lib/byebug/settings/autolist.rb index 0aec91e4d..85a612446 100644 --- a/lib/byebug/settings/autolist.rb +++ b/lib/byebug/settings/autolist.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/setting" require "byebug/commands/list" diff --git a/lib/byebug/settings/autopry.rb b/lib/byebug/settings/autopry.rb index d6fbebfd6..c28ea1e86 100644 --- a/lib/byebug/settings/autopry.rb +++ b/lib/byebug/settings/autopry.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/setting" require "byebug/commands/pry" diff --git a/lib/byebug/settings/autosave.rb b/lib/byebug/settings/autosave.rb index bf290ff72..3378827e2 100644 --- a/lib/byebug/settings/autosave.rb +++ b/lib/byebug/settings/autosave.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/setting" module Byebug diff --git a/lib/byebug/settings/basename.rb b/lib/byebug/settings/basename.rb index 14ea343c2..9b442dacb 100644 --- a/lib/byebug/settings/basename.rb +++ b/lib/byebug/settings/basename.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/setting" module Byebug diff --git a/lib/byebug/settings/fullpath.rb b/lib/byebug/settings/fullpath.rb index c9797550c..546887e12 100644 --- a/lib/byebug/settings/fullpath.rb +++ b/lib/byebug/settings/fullpath.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/setting" module Byebug diff --git a/lib/byebug/settings/histfile.rb b/lib/byebug/settings/histfile.rb index 39a332b52..d5caa2e26 100644 --- a/lib/byebug/settings/histfile.rb +++ b/lib/byebug/settings/histfile.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/setting" module Byebug diff --git a/lib/byebug/settings/histsize.rb b/lib/byebug/settings/histsize.rb index e38d4d420..07022bcb1 100644 --- a/lib/byebug/settings/histsize.rb +++ b/lib/byebug/settings/histsize.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/setting" module Byebug diff --git a/lib/byebug/settings/linetrace.rb b/lib/byebug/settings/linetrace.rb index f67d65e65..9c13889ee 100644 --- a/lib/byebug/settings/linetrace.rb +++ b/lib/byebug/settings/linetrace.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/setting" module Byebug diff --git a/lib/byebug/settings/listsize.rb b/lib/byebug/settings/listsize.rb index 67cfa8c6b..2ba175c64 100644 --- a/lib/byebug/settings/listsize.rb +++ b/lib/byebug/settings/listsize.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/setting" module Byebug diff --git a/lib/byebug/settings/post_mortem.rb b/lib/byebug/settings/post_mortem.rb index e6c7912f6..a9ca4b0eb 100644 --- a/lib/byebug/settings/post_mortem.rb +++ b/lib/byebug/settings/post_mortem.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/setting" module Byebug diff --git a/lib/byebug/settings/savefile.rb b/lib/byebug/settings/savefile.rb index 105902435..93540b6d0 100644 --- a/lib/byebug/settings/savefile.rb +++ b/lib/byebug/settings/savefile.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/setting" module Byebug diff --git a/lib/byebug/settings/stack_on_error.rb b/lib/byebug/settings/stack_on_error.rb index e354b48f4..455942985 100644 --- a/lib/byebug/settings/stack_on_error.rb +++ b/lib/byebug/settings/stack_on_error.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/setting" module Byebug diff --git a/lib/byebug/settings/width.rb b/lib/byebug/settings/width.rb index b475f63ca..49a0ebe86 100644 --- a/lib/byebug/settings/width.rb +++ b/lib/byebug/settings/width.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "byebug/setting" module Byebug diff --git a/lib/byebug/subcommands.rb b/lib/byebug/subcommands.rb index ddbfc237c..6011420f8 100644 --- a/lib/byebug/subcommands.rb +++ b/lib/byebug/subcommands.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "forwardable" require "byebug/helpers/reflection" diff --git a/script/minitest_runner.rb b/script/minitest_runner.rb index 0733b19f7..b67c14888 100755 --- a/script/minitest_runner.rb +++ b/script/minitest_runner.rb @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true $LOAD_PATH << File.expand_path(File.join("..", "lib"), __dir__) $LOAD_PATH << File.expand_path(File.join("..", "test"), __dir__) diff --git a/test/commands/break_test.rb b/test/commands/break_test.rb index 68275bea0..32b1b628e 100644 --- a/test/commands/break_test.rb +++ b/test/commands/break_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug @@ -251,7 +253,7 @@ def test_setting_breakpoint_with_bad_relative_path_doesnt_crash end def test_setting_breakpoint_with_relative_path_adds_the_breakpoint - enter "break ./test/commands/break_test.rb:8" + enter "break ./test/commands/break_test.rb:3" debug_code(program) check_output_includes(/Created breakpoint/) diff --git a/test/commands/catch_test.rb b/test/commands/catch_test.rb index b401a192a..7c9d17fe3 100644 --- a/test/commands/catch_test.rb +++ b/test/commands/catch_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/condition_test.rb b/test/commands/condition_test.rb index b9daae84f..a3a769ff8 100644 --- a/test/commands/condition_test.rb +++ b/test/commands/condition_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/continue_test.rb b/test/commands/continue_test.rb index de9ed5b6c..9b3e93579 100644 --- a/test/commands/continue_test.rb +++ b/test/commands/continue_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/debug_test.rb b/test/commands/debug_test.rb index a1acf41a3..8236cc12b 100644 --- a/test/commands/debug_test.rb +++ b/test/commands/debug_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/delete_test.rb b/test/commands/delete_test.rb index 1057256dd..249fd78cb 100644 --- a/test/commands/delete_test.rb +++ b/test/commands/delete_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/disable_test.rb b/test/commands/disable_test.rb index 50e58a1ee..b20ba99c9 100644 --- a/test/commands/disable_test.rb +++ b/test/commands/disable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/display_test.rb b/test/commands/display_test.rb index 6dd13f7f6..490ecedf3 100644 --- a/test/commands/display_test.rb +++ b/test/commands/display_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/down_test.rb b/test/commands/down_test.rb index 3b2c66864..fa904077a 100644 --- a/test/commands/down_test.rb +++ b/test/commands/down_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/edit_test.rb b/test/commands/edit_test.rb index 919d5a8a0..dfb72263b 100644 --- a/test/commands/edit_test.rb +++ b/test/commands/edit_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/enable_test.rb b/test/commands/enable_test.rb index a4a64b864..dbe442f05 100644 --- a/test/commands/enable_test.rb +++ b/test/commands/enable_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/finish_test.rb b/test/commands/finish_test.rb index 07e34b0cd..9abecacca 100644 --- a/test/commands/finish_test.rb +++ b/test/commands/finish_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/frame_test.rb b/test/commands/frame_test.rb index 2102c2848..3cd6084ba 100644 --- a/test/commands/frame_test.rb +++ b/test/commands/frame_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/help_test.rb b/test/commands/help_test.rb index e4dbade6b..c920ad306 100644 --- a/test/commands/help_test.rb +++ b/test/commands/help_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/history_test.rb b/test/commands/history_test.rb index f9fa89678..d2265d77c 100644 --- a/test/commands/history_test.rb +++ b/test/commands/history_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" unless ENV["LIBEDIT"] diff --git a/test/commands/info_test.rb b/test/commands/info_test.rb index 90c98f3b9..0c9a1631d 100644 --- a/test/commands/info_test.rb +++ b/test/commands/info_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/interrupt_test.rb b/test/commands/interrupt_test.rb index ae07d82e8..81a193b56 100644 --- a/test/commands/interrupt_test.rb +++ b/test/commands/interrupt_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/irb_test.rb b/test/commands/irb_test.rb index 55e2fe53c..8e2549a2d 100644 --- a/test/commands/irb_test.rb +++ b/test/commands/irb_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" require "minitest/mock" diff --git a/test/commands/kill_test.rb b/test/commands/kill_test.rb index a3e7ab13c..9e5fc3737 100644 --- a/test/commands/kill_test.rb +++ b/test/commands/kill_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/list_test.rb b/test/commands/list_test.rb index 42e1cf56a..2f6b49926 100644 --- a/test/commands/list_test.rb +++ b/test/commands/list_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/method_test.rb b/test/commands/method_test.rb index 03b9fbf2c..d3d330667 100644 --- a/test/commands/method_test.rb +++ b/test/commands/method_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/next_test.rb b/test/commands/next_test.rb index 5b2124142..3ede68d15 100644 --- a/test/commands/next_test.rb +++ b/test/commands/next_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/pry_test.rb b/test/commands/pry_test.rb index 124c505d6..80bf783c6 100644 --- a/test/commands/pry_test.rb +++ b/test/commands/pry_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "pry" require "test_helper" require "minitest/mock" diff --git a/test/commands/quit_test.rb b/test/commands/quit_test.rb index 440800163..ba42a1f91 100644 --- a/test/commands/quit_test.rb +++ b/test/commands/quit_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" require "minitest/mock" diff --git a/test/commands/restart_test.rb b/test/commands/restart_test.rb index a349b9448..489a4c630 100644 --- a/test/commands/restart_test.rb +++ b/test/commands/restart_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" require "rbconfig" require "minitest/mock" diff --git a/test/commands/save_test.rb b/test/commands/save_test.rb index 4a90605d9..cf18e3dc1 100644 --- a/test/commands/save_test.rb +++ b/test/commands/save_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/set_test.rb b/test/commands/set_test.rb index 687b8222f..d896b2f05 100644 --- a/test/commands/set_test.rb +++ b/test/commands/set_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/show_test.rb b/test/commands/show_test.rb index 1a57986bb..8b0d67714 100644 --- a/test/commands/show_test.rb +++ b/test/commands/show_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/source_test.rb b/test/commands/source_test.rb index e6fcf1ab8..dea2c5f93 100644 --- a/test/commands/source_test.rb +++ b/test/commands/source_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/step_test.rb b/test/commands/step_test.rb index 1f34e609f..b7f4c48d4 100644 --- a/test/commands/step_test.rb +++ b/test/commands/step_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/thread_test.rb b/test/commands/thread_test.rb index 2711ac84e..d2c53e9b9 100644 --- a/test/commands/thread_test.rb +++ b/test/commands/thread_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/tracevar_test.rb b/test/commands/tracevar_test.rb index a4644cb89..664ff79af 100644 --- a/test/commands/tracevar_test.rb +++ b/test/commands/tracevar_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/undisplay_test.rb b/test/commands/undisplay_test.rb index bd4a1c033..b6d16b392 100644 --- a/test/commands/undisplay_test.rb +++ b/test/commands/undisplay_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/up_test.rb b/test/commands/up_test.rb index 9711b4cdd..18ee0dfa1 100644 --- a/test/commands/up_test.rb +++ b/test/commands/up_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/var_test.rb b/test/commands/var_test.rb index af3c402ab..16e119a3f 100644 --- a/test/commands/var_test.rb +++ b/test/commands/var_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/commands/where_test.rb b/test/commands/where_test.rb index b3f3a85cd..ae17522fe 100644 --- a/test/commands/where_test.rb +++ b/test/commands/where_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/debugger_alias_test.rb b/test/debugger_alias_test.rb index 40d884039..e1dd87eef 100644 --- a/test/debugger_alias_test.rb +++ b/test/debugger_alias_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/interface_test.rb b/test/interface_test.rb index 52f378cd9..9f541d40d 100644 --- a/test/interface_test.rb +++ b/test/interface_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/interfaces/local_interface_test.rb b/test/interfaces/local_interface_test.rb index fdacee229..0e6338f56 100644 --- a/test/interfaces/local_interface_test.rb +++ b/test/interfaces/local_interface_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" require "minitest/mock" diff --git a/test/interfaces/script_interface_test.rb b/test/interfaces/script_interface_test.rb index f10c2a883..5c0a5f1b6 100644 --- a/test/interfaces/script_interface_test.rb +++ b/test/interfaces/script_interface_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/post_mortem_test.rb b/test/post_mortem_test.rb index 355b88e91..8734ee277 100644 --- a/test/post_mortem_test.rb +++ b/test/post_mortem_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/printers/plain_test.rb b/test/printers/plain_test.rb index 1dbc7147c..77718168c 100644 --- a/test/printers/plain_test.rb +++ b/test/printers/plain_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" require "minitest/mock" require "byebug/helpers/string" diff --git a/test/processors/command_processor_test.rb b/test/processors/command_processor_test.rb index c7fdfd214..8fb45d4b8 100644 --- a/test/processors/command_processor_test.rb +++ b/test/processors/command_processor_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" require "timeout" diff --git a/test/processors/script_processor_test.rb b/test/processors/script_processor_test.rb index e81da46cb..f06aef734 100644 --- a/test/processors/script_processor_test.rb +++ b/test/processors/script_processor_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" module Byebug diff --git a/test/rc_test.rb b/test/rc_test.rb index 8a9c777bb..77864bfed 100644 --- a/test/rc_test.rb +++ b/test/rc_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" require "byebug/runner" diff --git a/test/runner_test.rb b/test/runner_test.rb index a97a08fda..dbec5b7bf 100644 --- a/test/runner_test.rb +++ b/test/runner_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "test_helper" require "byebug/runner" diff --git a/test/support/assertions.rb b/test/support/assertions.rb index d05b6ec9a..2b9b4f6da 100644 --- a/test/support/assertions.rb +++ b/test/support/assertions.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "minitest/mock" module Minitest diff --git a/test/support/coverage.rb b/test/support/coverage.rb index 47e3098c5..0771e165c 100644 --- a/test/support/coverage.rb +++ b/test/support/coverage.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # # Starts code coverage tracking. # diff --git a/test/support/matchers.rb b/test/support/matchers.rb index 70e4909a5..b7bee420c 100644 --- a/test/support/matchers.rb +++ b/test/support/matchers.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "support/assertions" module Byebug diff --git a/test/support/temporary.rb b/test/support/temporary.rb index 3e87e8802..beed933fe 100644 --- a/test/support/temporary.rb +++ b/test/support/temporary.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Byebug # # Some custom matches for changing stuff temporarily during tests diff --git a/test/support/test_case.rb b/test/support/test_case.rb index 9e6be93f7..f5f141ba1 100644 --- a/test/support/test_case.rb +++ b/test/support/test_case.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "minitest" require "byebug" require "byebug/core" diff --git a/test/support/utils.rb b/test/support/utils.rb index 2ca4a75a4..d82bb45af 100644 --- a/test/support/utils.rb +++ b/test/support/utils.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "support/matchers" require "support/temporary" diff --git a/test/test_helper.rb b/test/test_helper.rb index 487306851..9bdf77efd 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "support/coverage" require "support/test_case"