Skip to content

Commit 7a37045

Browse files
josegomezrko1
authored andcommitted
Handle not existing $FILENAME in Session#process_protocol_request
`Session#process_protocol_request` gracefully handles `Errno::ENOENT` when `eval`-ing `$FILENAME`, and it doens't exist.
1 parent 465e4dd commit 7a37045

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/debug/server_cdp.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,11 @@ def process_protocol_request req
748748
request_tc [:cdp, :scope, req, fid]
749749
when 'global'
750750
vars = safe_global_variables.sort.map do |name|
751-
gv = eval(name.to_s)
751+
begin
752+
gv = eval(name.to_s)
753+
rescue Errno::ENOENT
754+
gv = nil
755+
end
752756
prop = {
753757
name: name,
754758
value: {

0 commit comments

Comments
 (0)