Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/debug/thread_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1019,8 +1019,8 @@ def wait_next_action_
# enable recording
if !@recorder
@recorder = Recorder.new
@recorder.enable
end
@recorder.enable
when :off
if @recorder&.enabled?
@recorder.disable
Expand Down
29 changes: 29 additions & 0 deletions test/console/record_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,33 @@ def test_1629263892
end
end
end

class RecordOnAfterStoppingOnceTest < TestCase
def program
<<~RUBY
1| a=1
2|
3| b=1
4|
5| c=1
6| p a
RUBY
end

def test_1656237686
debug_code(program) do
type 'record on'
type 'record off'
type 'record on'
type 'b 5'
type 'c'
assert_line_num 5
type 'step back'
assert_line_text([
/\[replay\] =>\#0\t<main> at .*/
])
type 'q!'
end
end
end
end