byebug 11.0.1 → 11.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/CONTRIBUTING.md +2 -2
  4. data/README.md +16 -9
  5. data/exe/byebug +1 -1
  6. data/ext/byebug/byebug.c +4 -9
  7. data/ext/byebug/byebug.h +4 -2
  8. data/ext/byebug/context.c +15 -2
  9. data/lib/byebug.rb +1 -1
  10. data/lib/byebug/attacher.rb +2 -2
  11. data/lib/byebug/command.rb +2 -2
  12. data/lib/byebug/command_list.rb +1 -1
  13. data/lib/byebug/commands.rb +38 -38
  14. data/lib/byebug/commands/break.rb +5 -5
  15. data/lib/byebug/commands/catch.rb +2 -2
  16. data/lib/byebug/commands/condition.rb +2 -2
  17. data/lib/byebug/commands/continue.rb +2 -2
  18. data/lib/byebug/commands/debug.rb +2 -2
  19. data/lib/byebug/commands/delete.rb +2 -2
  20. data/lib/byebug/commands/disable.rb +3 -3
  21. data/lib/byebug/commands/disable/breakpoints.rb +1 -1
  22. data/lib/byebug/commands/disable/display.rb +1 -1
  23. data/lib/byebug/commands/display.rb +2 -2
  24. data/lib/byebug/commands/down.rb +3 -3
  25. data/lib/byebug/commands/edit.rb +1 -1
  26. data/lib/byebug/commands/enable.rb +3 -3
  27. data/lib/byebug/commands/enable/breakpoints.rb +1 -1
  28. data/lib/byebug/commands/enable/display.rb +1 -1
  29. data/lib/byebug/commands/finish.rb +2 -2
  30. data/lib/byebug/commands/frame.rb +3 -3
  31. data/lib/byebug/commands/help.rb +2 -2
  32. data/lib/byebug/commands/history.rb +2 -2
  33. data/lib/byebug/commands/info.rb +6 -6
  34. data/lib/byebug/commands/info/file.rb +1 -1
  35. data/lib/byebug/commands/interrupt.rb +1 -1
  36. data/lib/byebug/commands/irb.rb +1 -1
  37. data/lib/byebug/commands/kill.rb +1 -1
  38. data/lib/byebug/commands/list.rb +4 -4
  39. data/lib/byebug/commands/method.rb +2 -2
  40. data/lib/byebug/commands/next.rb +2 -2
  41. data/lib/byebug/commands/pry.rb +2 -2
  42. data/lib/byebug/commands/quit.rb +1 -1
  43. data/lib/byebug/commands/restart.rb +3 -3
  44. data/lib/byebug/commands/save.rb +1 -1
  45. data/lib/byebug/commands/set.rb +3 -3
  46. data/lib/byebug/commands/show.rb +1 -1
  47. data/lib/byebug/commands/skip.rb +2 -2
  48. data/lib/byebug/commands/source.rb +1 -1
  49. data/lib/byebug/commands/step.rb +2 -2
  50. data/lib/byebug/commands/thread.rb +6 -6
  51. data/lib/byebug/commands/thread/current.rb +1 -1
  52. data/lib/byebug/commands/thread/list.rb +1 -1
  53. data/lib/byebug/commands/thread/resume.rb +1 -1
  54. data/lib/byebug/commands/thread/stop.rb +1 -1
  55. data/lib/byebug/commands/thread/switch.rb +1 -1
  56. data/lib/byebug/commands/tracevar.rb +1 -1
  57. data/lib/byebug/commands/undisplay.rb +2 -2
  58. data/lib/byebug/commands/untracevar.rb +1 -1
  59. data/lib/byebug/commands/up.rb +3 -3
  60. data/lib/byebug/commands/var.rb +8 -8
  61. data/lib/byebug/commands/var/all.rb +1 -1
  62. data/lib/byebug/commands/var/args.rb +1 -1
  63. data/lib/byebug/commands/var/const.rb +1 -1
  64. data/lib/byebug/commands/var/instance.rb +1 -1
  65. data/lib/byebug/commands/var/local.rb +1 -1
  66. data/lib/byebug/commands/where.rb +2 -2
  67. data/lib/byebug/context.rb +4 -4
  68. data/lib/byebug/core.rb +10 -10
  69. data/lib/byebug/frame.rb +2 -2
  70. data/lib/byebug/helpers/parse.rb +1 -1
  71. data/lib/byebug/helpers/toggle.rb +1 -1
  72. data/lib/byebug/helpers/var.rb +1 -1
  73. data/lib/byebug/history.rb +1 -1
  74. data/lib/byebug/interface.rb +6 -6
  75. data/lib/byebug/interfaces/remote_interface.rb +1 -1
  76. data/lib/byebug/interfaces/script_interface.rb +1 -1
  77. data/lib/byebug/printers/plain.rb +1 -1
  78. data/lib/byebug/processors/command_processor.rb +2 -2
  79. data/lib/byebug/processors/control_processor.rb +1 -1
  80. data/lib/byebug/processors/post_mortem_processor.rb +1 -1
  81. data/lib/byebug/processors/script_processor.rb +1 -1
  82. data/lib/byebug/remote.rb +3 -3
  83. data/lib/byebug/runner.rb +7 -7
  84. data/lib/byebug/setting.rb +2 -2
  85. data/lib/byebug/settings/autoirb.rb +2 -2
  86. data/lib/byebug/settings/autolist.rb +2 -2
  87. data/lib/byebug/settings/autopry.rb +2 -2
  88. data/lib/byebug/settings/autosave.rb +1 -1
  89. data/lib/byebug/settings/basename.rb +1 -1
  90. data/lib/byebug/settings/callstyle.rb +1 -1
  91. data/lib/byebug/settings/fullpath.rb +1 -1
  92. data/lib/byebug/settings/histfile.rb +1 -1
  93. data/lib/byebug/settings/histsize.rb +1 -1
  94. data/lib/byebug/settings/linetrace.rb +1 -1
  95. data/lib/byebug/settings/listsize.rb +1 -1
  96. data/lib/byebug/settings/post_mortem.rb +1 -1
  97. data/lib/byebug/settings/savefile.rb +1 -1
  98. data/lib/byebug/settings/stack_on_error.rb +1 -1
  99. data/lib/byebug/settings/width.rb +1 -1
  100. data/lib/byebug/source_file_formatter.rb +2 -2
  101. data/lib/byebug/subcommands.rb +2 -2
  102. data/lib/byebug/version.rb +1 -1
  103. metadata +4 -4
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/helpers/eval"
3
+ require_relative "../../helpers/eval"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/helpers/var"
3
+ require_relative "../../helpers/var"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/helpers/var"
3
+ require_relative "../../helpers/var"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "pathname"
4
- require "byebug/command"
5
- require "byebug/helpers/frame"
4
+ require_relative "../command"
5
+ require_relative "../helpers/frame"
6
6
 
7
7
  module Byebug
8
8
  #
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/frame"
4
- require "byebug/helpers/path"
5
- require "byebug/helpers/file"
6
- require "byebug/processors/command_processor"
3
+ require_relative "frame"
4
+ require_relative "helpers/path"
5
+ require_relative "helpers/file"
6
+ require_relative "processors/command_processor"
7
7
 
8
8
  module Byebug
9
9
  #
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/helpers/reflection"
4
- require "byebug/byebug"
5
- require "byebug/context"
6
- require "byebug/breakpoint"
7
- require "byebug/interface"
8
- require "byebug/processors/script_processor"
9
- require "byebug/processors/post_mortem_processor"
10
- require "byebug/commands"
11
- require "byebug/remote"
12
- require "byebug/printers/plain"
3
+ require_relative "helpers/reflection"
4
+ require_relative "byebug"
5
+ require_relative "context"
6
+ require_relative "breakpoint"
7
+ require_relative "interface"
8
+ require_relative "processors/script_processor"
9
+ require_relative "processors/post_mortem_processor"
10
+ require_relative "commands"
11
+ require_relative "remote"
12
+ require_relative "printers/plain"
13
13
 
14
14
  #
15
15
  # Main debugger's container module. Everything is defined under this module
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/helpers/file"
3
+ require_relative "helpers/file"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -118,7 +118,7 @@ module Byebug
118
118
  # Properly formatted frame number of frame
119
119
  #
120
120
  def deco_pos
121
- format("%-2d", pos)
121
+ format("%-2<pos>d", pos: pos)
122
122
  end
123
123
 
124
124
  #
@@ -15,7 +15,7 @@ module Byebug
15
15
  # purpose.
16
16
  #
17
17
  def get_int(str, cmd, min = nil, max = nil)
18
- return nil, pr("parse.errors.int.not_number", cmd: cmd, str: str) if str !~ /\A-?[0-9]+\z/
18
+ return nil, pr("parse.errors.int.not_number", cmd: cmd, str: str) unless /\A-?[0-9]+\z/.match?(str)
19
19
 
20
20
  int = str.to_i
21
21
  if min && int < min
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/helpers/parse"
3
+ require_relative "parse"
4
4
 
5
5
  module Byebug
6
6
  module Helpers
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/helpers/eval"
3
+ require_relative "eval"
4
4
 
5
5
  module Byebug
6
6
  module Helpers
@@ -121,7 +121,7 @@ module Byebug
121
121
  # For now, empty lines and consecutive duplicates.
122
122
  #
123
123
  def ignore?(buf)
124
- return true if /^\s*$/ =~ buf
124
+ return true if /^\s*$/.match?(buf)
125
125
  return false if Readline::HISTORY.empty?
126
126
 
127
127
  buffer[Readline::HISTORY.length - 1] == buf
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
4
- require "byebug/history"
5
- require "byebug/helpers/file"
3
+ require_relative "setting"
4
+ require_relative "history"
5
+ require_relative "helpers/file"
6
6
 
7
7
  #
8
8
  # Namespace for all of byebug's code
@@ -141,6 +141,6 @@ module Byebug
141
141
  end
142
142
  end
143
143
 
144
- require "byebug/interfaces/local_interface"
145
- require "byebug/interfaces/script_interface"
146
- require "byebug/interfaces/remote_interface"
144
+ require_relative "interfaces/local_interface"
145
+ require_relative "interfaces/script_interface"
146
+ require_relative "interfaces/remote_interface"
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/history"
3
+ require_relative "../history"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -24,7 +24,7 @@ module Byebug
24
24
  def readline(*)
25
25
  while (result = input.gets)
26
26
  output.puts "+ #{result}" if @verbose
27
- next if result =~ /^\s*#/
27
+ next if /^\s*#/.match?(result)
28
28
 
29
29
  return result.chomp
30
30
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/printers/base"
3
+ require_relative "base"
4
4
 
5
5
  module Byebug
6
6
  module Printers
@@ -2,8 +2,8 @@
2
2
 
3
3
  require "forwardable"
4
4
 
5
- require "byebug/helpers/eval"
6
- require "byebug/errors"
5
+ require_relative "../helpers/eval"
6
+ require_relative "../errors"
7
7
 
8
8
  module Byebug
9
9
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/processors/command_processor"
3
+ require_relative "command_processor"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/processors/command_processor"
3
+ require_relative "command_processor"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/processors/command_processor"
3
+ require_relative "command_processor"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "socket"
4
- require "byebug/processors/control_processor"
5
- require "byebug/remote/server"
6
- require "byebug/remote/client"
4
+ require_relative "processors/control_processor"
5
+ require_relative "remote/server"
6
+ require_relative "remote/client"
7
7
 
8
8
  #
9
9
  # Remote debugging functionality.
@@ -2,13 +2,13 @@
2
2
 
3
3
  require "optparse"
4
4
  require "English"
5
- require "byebug/core"
6
- require "byebug/version"
7
- require "byebug/helpers/bin"
8
- require "byebug/helpers/parse"
9
- require "byebug/helpers/string"
10
- require "byebug/option_setter"
11
- require "byebug/processors/control_processor"
5
+ require_relative "core"
6
+ require_relative "version"
7
+ require_relative "helpers/bin"
8
+ require_relative "helpers/parse"
9
+ require_relative "helpers/string"
10
+ require_relative "option_setter"
11
+ require_relative "processors/control_processor"
12
12
 
13
13
  module Byebug
14
14
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/helpers/string"
3
+ require_relative "helpers/string"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -52,7 +52,7 @@ module Byebug
52
52
  end
53
53
 
54
54
  def find(shortcut)
55
- abbr = shortcut =~ /^no/ ? shortcut[2..-1] : shortcut
55
+ abbr = /^no/.match?(shortcut) ? shortcut[2..-1] : shortcut
56
56
  matches = settings.select do |key, value|
57
57
  key =~ (value.boolean? ? /#{abbr}/ : /#{shortcut}/)
58
58
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
4
- require "byebug/commands/irb"
3
+ require_relative "../setting"
4
+ require_relative "../commands/irb"
5
5
 
6
6
  module Byebug
7
7
  #
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
4
- require "byebug/commands/list"
3
+ require_relative "../setting"
4
+ require_relative "../commands/list"
5
5
 
6
6
  module Byebug
7
7
  #
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
4
- require "byebug/commands/pry"
3
+ require_relative "../setting"
4
+ require_relative "../commands/pry"
5
5
 
6
6
  module Byebug
7
7
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
3
+ require_relative "../setting"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
3
+ require_relative "../setting"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
3
+ require_relative "../setting"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
3
+ require_relative "../setting"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
3
+ require_relative "../setting"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
3
+ require_relative "../setting"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
3
+ require_relative "../setting"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
3
+ require_relative "../setting"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
3
+ require_relative "../setting"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
3
+ require_relative "../setting"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
3
+ require_relative "../setting"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/setting"
3
+ require_relative "../setting"
4
4
 
5
5
  module Byebug
6
6
  #
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "byebug/helpers/file"
4
- require "byebug/setting"
3
+ require_relative "helpers/file"
4
+ require_relative "setting"
5
5
 
6
6
  module Byebug
7
7
  #
@@ -2,8 +2,8 @@
2
2
 
3
3
  require "forwardable"
4
4
 
5
- require "byebug/helpers/reflection"
6
- require "byebug/command_list"
5
+ require_relative "helpers/reflection"
6
+ require_relative "command_list"
7
7
 
8
8
  module Byebug
9
9
  #
@@ -4,5 +4,5 @@
4
4
  # Reopen main module to define the library version
5
5
  #
6
6
  module Byebug
7
- VERSION = "11.0.1"
7
+ VERSION = "11.1.0"
8
8
  end