ruby / debug

Debugging functionality for Ruby
BSD 2-Clause "Simplified" License
1.14k stars 127 forks source link

do not include `$FILENAME` in globals #1105

Closed nyz93 closed 6 months ago

nyz93 commented 6 months ago

$FILENAME is unsafe to include in the globals because it modifies ARGV and raises an error if it's a file that does not exist. This causes two issues if rdbg used to debug a command with arguments:

ko1 commented 6 months ago

Thank you!

launchable-app[bot] commented 6 months ago

Launchable Report

:x: Test session #2946090 failedos:ubuntu-latest test_task:test_protocoldetails on CI
:bell: no issues :heavy_multiplication_x:1 test failed :heavy_check_mark:63 tests passed

:x: Test session #2946091 failedos:ubuntu-latest test_task:test_protocoldetails on CI
:bell: no issues :heavy_multiplication_x:1 test failed :heavy_check_mark:63 tests passed

:x: Test session #2946093 failedos:ubuntu-latest test_task:test_protocoldetails on CI
:bell: no issues :heavy_multiplication_x:1 test failed :heavy_check_mark:63 tests passed

:x: Test session #2946094 failedos:ubuntu-latest test_task:test_protocoldetails on CI
:bell: no issues :heavy_multiplication_x:1 test failed :heavy_check_mark:63 tests passed

:x: Test session #2946120 failedos:ubuntu-latest test_task:test_consoledetails on CI
:bell: no issues :heavy_multiplication_x:1 test failed :heavy_check_mark:296 tests passed

Passed test sessions :white_check_mark: Test session [#2946072](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946072) passed [![os:ubuntu-latest](https://img.shields.io/badge/os-ubuntu--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946072) [![test_task:test_test](https://img.shields.io/badge/test__task-test__test-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946072) [details on CI](https://github.com/ruby/debug/actions/runs/9304768751) :white_check_mark: Test session [#2946073](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946073) passed [![os:ubuntu-latest](https://img.shields.io/badge/os-ubuntu--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946073) [![test_task:test_test](https://img.shields.io/badge/test__task-test__test-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946073) [details on CI](https://github.com/ruby/debug/actions/runs/9304768751) :white_check_mark: Test session [#2946076](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946076) passed [![os:ubuntu-latest](https://img.shields.io/badge/os-ubuntu--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946076) [![test_task:test_test](https://img.shields.io/badge/test__task-test__test-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946076) [details on CI](https://github.com/ruby/debug/actions/runs/9304768751) :white_check_mark: Test session [#2946077](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946077) passed [![os:ubuntu-latest](https://img.shields.io/badge/os-ubuntu--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946077) [![test_task:test_test](https://img.shields.io/badge/test__task-test__test-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946077) [details on CI](https://github.com/ruby/debug/actions/runs/9304768751) :white_check_mark: Test session [#2946080](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946080) passed [![os:ubuntu-latest](https://img.shields.io/badge/os-ubuntu--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946080) [![test_task:test_test](https://img.shields.io/badge/test__task-test__test-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946080) [details on CI](https://github.com/ruby/debug/actions/runs/9304768751) :white_check_mark: Test session [#2946082](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946082) passed [![os:ubuntu-latest](https://img.shields.io/badge/os-ubuntu--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946082) [![test_task:test_test](https://img.shields.io/badge/test__task-test__test-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946082) [details on CI](https://github.com/ruby/debug/actions/runs/9304768751) :white_check_mark: Test session [#2946084](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946084) passed [![os:ubuntu-latest](https://img.shields.io/badge/os-ubuntu--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946084) [![test_task:test_protocol](https://img.shields.io/badge/test__task-test__protocol-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946084) [details on CI](https://github.com/ruby/debug/actions/runs/9304768743) :white_check_mark: Test session [#2946085](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946085) passed [![os:ubuntu-latest](https://img.shields.io/badge/os-ubuntu--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946085) [![test_task:test_protocol](https://img.shields.io/badge/test__task-test__protocol-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946085) [details on CI](https://github.com/ruby/debug/actions/runs/9304768743) :white_check_mark: Test session [#2946096](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946096) passed [![os:ubuntu-latest](https://img.shields.io/badge/os-ubuntu--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946096) [![test_task:test_protocol](https://img.shields.io/badge/test__task-test__protocol-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946096) [details on CI](https://github.com/ruby/debug/actions/runs/9304768743) :white_check_mark: Test session [#2946103](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946103) passed [![os:macos-latest](https://img.shields.io/badge/os-macos--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946103) [![test_task:test_console](https://img.shields.io/badge/test__task-test__console-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946103) [details on CI](https://github.com/ruby/debug/actions/runs/9304768773) :white_check_mark: Test session [#2946104](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946104) passed [![os:ubuntu-latest](https://img.shields.io/badge/os-ubuntu--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946104) [![test_task:test_console](https://img.shields.io/badge/test__task-test__console-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946104) [details on CI](https://github.com/ruby/debug/actions/runs/9304768780) :white_check_mark: Test session [#2946106](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946106) passed [![os:ubuntu-latest](https://img.shields.io/badge/os-ubuntu--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946106) [![test_task:test_console](https://img.shields.io/badge/test__task-test__console-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946106) [details on CI](https://github.com/ruby/debug/actions/runs/9304768780) :white_check_mark: Test session [#2946107](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946107) passed [![os:macos-latest](https://img.shields.io/badge/os-macos--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946107) [![test_task:test_console](https://img.shields.io/badge/test__task-test__console-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946107) [details on CI](https://github.com/ruby/debug/actions/runs/9304768773) :white_check_mark: Test session [#2946111](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946111) passed [![os:ubuntu-latest](https://img.shields.io/badge/os-ubuntu--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946111) [![test_task:test_console](https://img.shields.io/badge/test__task-test__console-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946111) [details on CI](https://github.com/ruby/debug/actions/runs/9304768780) :white_check_mark: Test session [#2946114](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946114) passed [![os:macos-latest](https://img.shields.io/badge/os-macos--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946114) [![test_task:test_console](https://img.shields.io/badge/test__task-test__console-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946114) [details on CI](https://github.com/ruby/debug/actions/runs/9304768773) :white_check_mark: Test session [#2946121](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946121) passed [![os:ubuntu-latest](https://img.shields.io/badge/os-ubuntu--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946121) [![test_task:test_console](https://img.shields.io/badge/test__task-test__console-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946121) [details on CI](https://github.com/ruby/debug/actions/runs/9304768780) :white_check_mark: Test session [#2946123](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946123) passed [![os:ubuntu-latest](https://img.shields.io/badge/os-ubuntu--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946123) [![test_task:test_console](https://img.shields.io/badge/test__task-test__console-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946123) [details on CI](https://github.com/ruby/debug/actions/runs/9304768780) :white_check_mark: Test session [#2946141](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946141) passed [![os:ubuntu-latest](https://img.shields.io/badge/os-ubuntu--latest-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946141) [![test_task:test_console](https://img.shields.io/badge/test__task-test__console-blue.svg)](https://app.launchableinc.com/organizations/ruby/workspaces/debug/data/test-sessions/2946141) [details on CI](https://github.com/ruby/debug/actions/runs/9304768780)

Build: refs_pull_1105_merge_bb889708c935cc45b725629ceadecf0b2666927f