byebug 11.0.1 → 11.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/CONTRIBUTING.md +2 -2
- data/README.md +16 -9
- data/exe/byebug +1 -1
- data/ext/byebug/byebug.c +4 -9
- data/ext/byebug/byebug.h +4 -2
- data/ext/byebug/context.c +15 -2
- data/lib/byebug.rb +1 -1
- data/lib/byebug/attacher.rb +2 -2
- data/lib/byebug/command.rb +2 -2
- data/lib/byebug/command_list.rb +1 -1
- data/lib/byebug/commands.rb +38 -38
- data/lib/byebug/commands/break.rb +5 -5
- data/lib/byebug/commands/catch.rb +2 -2
- data/lib/byebug/commands/condition.rb +2 -2
- data/lib/byebug/commands/continue.rb +2 -2
- data/lib/byebug/commands/debug.rb +2 -2
- data/lib/byebug/commands/delete.rb +2 -2
- data/lib/byebug/commands/disable.rb +3 -3
- data/lib/byebug/commands/disable/breakpoints.rb +1 -1
- data/lib/byebug/commands/disable/display.rb +1 -1
- data/lib/byebug/commands/display.rb +2 -2
- data/lib/byebug/commands/down.rb +3 -3
- data/lib/byebug/commands/edit.rb +1 -1
- data/lib/byebug/commands/enable.rb +3 -3
- data/lib/byebug/commands/enable/breakpoints.rb +1 -1
- data/lib/byebug/commands/enable/display.rb +1 -1
- data/lib/byebug/commands/finish.rb +2 -2
- data/lib/byebug/commands/frame.rb +3 -3
- data/lib/byebug/commands/help.rb +2 -2
- data/lib/byebug/commands/history.rb +2 -2
- data/lib/byebug/commands/info.rb +6 -6
- data/lib/byebug/commands/info/file.rb +1 -1
- data/lib/byebug/commands/interrupt.rb +1 -1
- data/lib/byebug/commands/irb.rb +1 -1
- data/lib/byebug/commands/kill.rb +1 -1
- data/lib/byebug/commands/list.rb +4 -4
- data/lib/byebug/commands/method.rb +2 -2
- data/lib/byebug/commands/next.rb +2 -2
- data/lib/byebug/commands/pry.rb +2 -2
- data/lib/byebug/commands/quit.rb +1 -1
- data/lib/byebug/commands/restart.rb +3 -3
- data/lib/byebug/commands/save.rb +1 -1
- data/lib/byebug/commands/set.rb +3 -3
- data/lib/byebug/commands/show.rb +1 -1
- data/lib/byebug/commands/skip.rb +2 -2
- data/lib/byebug/commands/source.rb +1 -1
- data/lib/byebug/commands/step.rb +2 -2
- data/lib/byebug/commands/thread.rb +6 -6
- data/lib/byebug/commands/thread/current.rb +1 -1
- data/lib/byebug/commands/thread/list.rb +1 -1
- data/lib/byebug/commands/thread/resume.rb +1 -1
- data/lib/byebug/commands/thread/stop.rb +1 -1
- data/lib/byebug/commands/thread/switch.rb +1 -1
- data/lib/byebug/commands/tracevar.rb +1 -1
- data/lib/byebug/commands/undisplay.rb +2 -2
- data/lib/byebug/commands/untracevar.rb +1 -1
- data/lib/byebug/commands/up.rb +3 -3
- data/lib/byebug/commands/var.rb +8 -8
- data/lib/byebug/commands/var/all.rb +1 -1
- data/lib/byebug/commands/var/args.rb +1 -1
- data/lib/byebug/commands/var/const.rb +1 -1
- data/lib/byebug/commands/var/instance.rb +1 -1
- data/lib/byebug/commands/var/local.rb +1 -1
- data/lib/byebug/commands/where.rb +2 -2
- data/lib/byebug/context.rb +4 -4
- data/lib/byebug/core.rb +10 -10
- data/lib/byebug/frame.rb +2 -2
- data/lib/byebug/helpers/parse.rb +1 -1
- data/lib/byebug/helpers/toggle.rb +1 -1
- data/lib/byebug/helpers/var.rb +1 -1
- data/lib/byebug/history.rb +1 -1
- data/lib/byebug/interface.rb +6 -6
- data/lib/byebug/interfaces/remote_interface.rb +1 -1
- data/lib/byebug/interfaces/script_interface.rb +1 -1
- data/lib/byebug/printers/plain.rb +1 -1
- data/lib/byebug/processors/command_processor.rb +2 -2
- data/lib/byebug/processors/control_processor.rb +1 -1
- data/lib/byebug/processors/post_mortem_processor.rb +1 -1
- data/lib/byebug/processors/script_processor.rb +1 -1
- data/lib/byebug/remote.rb +3 -3
- data/lib/byebug/runner.rb +7 -7
- data/lib/byebug/setting.rb +2 -2
- data/lib/byebug/settings/autoirb.rb +2 -2
- data/lib/byebug/settings/autolist.rb +2 -2
- data/lib/byebug/settings/autopry.rb +2 -2
- data/lib/byebug/settings/autosave.rb +1 -1
- data/lib/byebug/settings/basename.rb +1 -1
- data/lib/byebug/settings/callstyle.rb +1 -1
- data/lib/byebug/settings/fullpath.rb +1 -1
- data/lib/byebug/settings/histfile.rb +1 -1
- data/lib/byebug/settings/histsize.rb +1 -1
- data/lib/byebug/settings/linetrace.rb +1 -1
- data/lib/byebug/settings/listsize.rb +1 -1
- data/lib/byebug/settings/post_mortem.rb +1 -1
- data/lib/byebug/settings/savefile.rb +1 -1
- data/lib/byebug/settings/stack_on_error.rb +1 -1
- data/lib/byebug/settings/width.rb +1 -1
- data/lib/byebug/source_file_formatter.rb +2 -2
- data/lib/byebug/subcommands.rb +2 -2
- data/lib/byebug/version.rb +1 -1
- metadata +4 -4
data/lib/byebug/context.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
#
|
data/lib/byebug/core.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
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
|
data/lib/byebug/frame.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
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("%-
|
121
|
+
format("%-2<pos>d", pos: pos)
|
122
122
|
end
|
123
123
|
|
124
124
|
#
|
data/lib/byebug/helpers/parse.rb
CHANGED
@@ -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)
|
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
|
data/lib/byebug/helpers/var.rb
CHANGED
data/lib/byebug/history.rb
CHANGED
@@ -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
|
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
|
data/lib/byebug/interface.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
-
|
145
|
-
|
146
|
-
|
144
|
+
require_relative "interfaces/local_interface"
|
145
|
+
require_relative "interfaces/script_interface"
|
146
|
+
require_relative "interfaces/remote_interface"
|
data/lib/byebug/remote.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "socket"
|
4
|
-
|
5
|
-
|
6
|
-
|
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.
|
data/lib/byebug/runner.rb
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
require "optparse"
|
4
4
|
require "English"
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
#
|
data/lib/byebug/setting.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
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 =
|
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
|
data/lib/byebug/subcommands.rb
CHANGED
data/lib/byebug/version.rb
CHANGED