break 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/break/commands/tracepoint_command.rb +16 -0
- data/lib/break/irb/commands.rb +3 -2
- data/lib/break/irb/frontend.rb +2 -2
- data/lib/break/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ef06d9ad6c7511104925c2b1d6f9e5a61b8dc2e1cb1f9b982701e927b7b7610
|
4
|
+
data.tar.gz: 7e5909e5fd6673e8a209c34763946816ed1304fd82d86340e7c998a5ba472994
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2c4c328b86982034c6113067c1f117d273d12a882c262713d2997d0e3d430c96964b60f46dc25ebe28eb8172188157841ca6fdbf737ea2f36e9aeb64139b882
|
7
|
+
data.tar.gz: 84f61f9b4c78e735b459b8f5b79a49ff9857e5f9b3fc28eb360f2dd2775b83b848d7c161267fb6008258018c38a8cd62cd1b0c62dcaf5003097a10082c5c1bd4
|
@@ -10,6 +10,18 @@ module Break
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
+
def initialize(*)
|
14
|
+
super
|
15
|
+
|
16
|
+
@delayed_context = Fiber.new do |*args|
|
17
|
+
session.context!(*args)
|
18
|
+
|
19
|
+
loop do
|
20
|
+
session.context!(*Fiber.yield)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
13
25
|
def execute(*args)
|
14
26
|
TracePoint.trace(*trace_events) do |trace|
|
15
27
|
next if Filter.internal?(trace.path)
|
@@ -26,6 +38,10 @@ module Break
|
|
26
38
|
|
27
39
|
private
|
28
40
|
|
41
|
+
def context!(*args)
|
42
|
+
@delayed_context.resume(*args)
|
43
|
+
end
|
44
|
+
|
29
45
|
def trace_events
|
30
46
|
self.class.trace_events
|
31
47
|
end
|
data/lib/break/irb/commands.rb
CHANGED
@@ -9,6 +9,7 @@ module Break::IRB
|
|
9
9
|
define_command session, :step, Break::StepCommand
|
10
10
|
define_command session, :up, Break::UpCommand
|
11
11
|
define_command session, :down, Break::DownCommand
|
12
|
+
define_command session, :list, Break::ListCommand
|
12
13
|
define_command session, :continue, Break::ContinueCommand, preserve: false
|
13
14
|
end
|
14
15
|
|
@@ -19,9 +20,9 @@ module Break::IRB
|
|
19
20
|
cls.new(session).execute(*args)
|
20
21
|
ensure
|
21
22
|
# We don't have a clear guideline of when an IRB session starts and
|
22
|
-
# when it ends. If we're
|
23
|
+
# when it ends. If we're executing commands, we have to quit the IRB
|
23
24
|
# session which naturally marks it as stopped. If we're executing a
|
24
|
-
# `break` command
|
25
|
+
# `break` command we actually want to keep marking it as started
|
25
26
|
# so we don't step over `binding.irb` calls.
|
26
27
|
Break::Session.start! if preserve
|
27
28
|
end
|
data/lib/break/irb/frontend.rb
CHANGED
@@ -43,9 +43,9 @@ module Break::IRB
|
|
43
43
|
# commands support in the lexer level, we need to call the `next` command
|
44
44
|
# in syntactically correct way.
|
45
45
|
def special_case_next_eval(irb_context)
|
46
|
-
def irb_context.evaluate(line, line_no,
|
46
|
+
def irb_context.evaluate(line, line_no, *args)
|
47
47
|
line = "self.next\n" if line == "next\n"
|
48
|
-
super(line, line_no,
|
48
|
+
super(line, line_no, *args)
|
49
49
|
end
|
50
50
|
|
51
51
|
irb_context
|
data/lib/break/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: break
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genadi Samokovarov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|