Skip to content

Commit

Permalink
Handle not existing $FILENAME in Session#process_protocol_request
Browse files Browse the repository at this point in the history
`Session#process_protocol_request` gracefully handles `Errno::ENOENT`
when `eval`-ing `$FILENAME`, and it doens't exist.
  • Loading branch information
josegomezr authored and ko1 committed Mar 7, 2023
1 parent 465e4dd commit 7a37045
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/debug/server_cdp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,11 @@ def process_protocol_request req
request_tc [:cdp, :scope, req, fid]
when 'global'
vars = safe_global_variables.sort.map do |name|
gv = eval(name.to_s)
begin
gv = eval(name.to_s)
rescue Errno::ENOENT
gv = nil
end
prop = {
name: name,
value: {
Expand Down

0 comments on commit 7a37045

Please sign in to comment.