Skip to content

Commit 25db36a

Browse files
author
ono-max
committed
Rename "abs" to "path" for clarity
1 parent 5823411 commit 25db36a

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

lib/debug/server_cdp.rb

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ def process
111111

112112
## boot/configuration
113113
when 'Page.getResourceTree'
114-
abs = File.absolute_path($0)
115-
src = File.read(abs)
116-
@src_map[abs] = src
114+
path = File.absolute_path($0)
115+
src = File.read(path)
116+
@src_map[path] = src
117117
send_response req,
118118
frameTree: {
119119
frame: {
@@ -126,8 +126,8 @@ def process
126126
]
127127
}
128128
send_event 'Debugger.scriptParsed',
129-
scriptId: abs,
130-
url: "http://debuggee#{abs}",
129+
scriptId: path,
130+
url: "http://debuggee#{path}",
131131
startLine: 0,
132132
startColumn: 0,
133133
endLine: src.count("\n"),
@@ -415,23 +415,21 @@ def process_cdp args
415415
callFrames: @target_frames.map.with_index{|frame, i|
416416
path = frame.realpath || frame.path
417417
if path.match /<internal:(.*)>/
418-
abs = $1
419-
else
420-
abs = path
418+
path = $1
421419
end
422420

423421
call_frame = {
424422
callFrameId: SecureRandom.hex(16),
425423
functionName: frame.name,
426424
functionLocation: {
427-
scriptId: abs,
425+
scriptId: path,
428426
lineNumber: 0
429427
},
430428
location: {
431-
scriptId: abs,
429+
scriptId: path,
432430
lineNumber: frame.location.lineno - 1 # The line number is 0-based.
433431
},
434-
url: "http://debuggee#{abs}",
432+
url: "http://debuggee#{path}",
435433
scopeChain: [
436434
{
437435
type: 'local',

0 commit comments

Comments
 (0)