Skip to content

Commit 2e130ff

Browse files
committed
rename method.
`request_tc_with_freed_threads` -> `request_tc_with_restarted_threads` because `freed` is ambiguous (with memory management).
1 parent 3255b71 commit 2e130ff

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lib/debug/session.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,15 @@ def request_tc(req)
256256
@tc << req
257257
end
258258

259-
def request_tc_with_freed_threads(req)
259+
def request_tc_with_restarted_threads(req)
260260
restart_all_threads
261261
request_tc(req)
262262
end
263263

264+
def request_eval type, src
265+
request_tc_with_restarted_threads [:eval, type, src]
266+
end
267+
264268
def process_event evt
265269
# variable `@internal_info` is only used for test
266270
tc, output, ev, @internal_info, *ev_args = evt
@@ -817,15 +821,15 @@ def register_default_command
817821

818822
case sub
819823
when nil
820-
request_tc_with_freed_threads [:show, :default, pat] # something useful
824+
request_tc_with_restarted_threads [:show, :default, pat] # something useful
821825
when :locals
822-
request_tc_with_freed_threads [:show, :locals, pat]
826+
request_tc_with_restarted_threads [:show, :locals, pat]
823827
when :ivars
824-
request_tc_with_freed_threads [:show, :ivars, pat, opt]
828+
request_tc_with_restarted_threads [:show, :ivars, pat, opt]
825829
when :consts
826-
request_tc_with_freed_threads [:show, :consts, pat, opt]
830+
request_tc_with_restarted_threads [:show, :consts, pat, opt]
827831
when :globals
828-
request_tc_with_freed_threads [:show, :globals, pat]
832+
request_tc_with_restarted_threads [:show, :globals, pat]
829833
when :threads
830834
thread_list
831835
:retry
@@ -845,7 +849,7 @@ def register_default_command
845849
# * Show you available methods and instance variables of the given object.
846850
# * If the object is a class/module, it also lists its constants.
847851
register_command 'outline', 'o', 'ls', unsafe: false do |arg|
848-
request_tc_with_freed_threads [:show, :outline, arg]
852+
request_tc_with_restarted_threads [:show, :outline, arg]
849853
end
850854

851855
# * `display`
@@ -990,7 +994,7 @@ def register_default_command
990994
:retry
991995

992996
when /\Aobject\s+(.+)/
993-
request_tc_with_freed_threads [:trace, :object, $1.strip, {pattern: pattern, into: into}]
997+
request_tc_with_restarted_threads [:trace, :object, $1.strip, {pattern: pattern, into: into}]
994998

995999
when /\Aoff\s+(\d+)\z/
9961000
if t = @tracers.values[$1.to_i]
@@ -1171,10 +1175,6 @@ def process_command line
11711175
return :retry
11721176
end
11731177

1174-
def request_eval type, src
1175-
request_tc_with_freed_threads [:eval, type, src]
1176-
end
1177-
11781178
def step_command type, arg
11791179
if type == :until
11801180
leave_subsession [:step, type, arg]

0 commit comments

Comments
 (0)