Skip to content

Commit 7478835

Browse files
adam12ko1
authored andcommitted
Only call File.file? when path present
Calling `iseq.absolute_path` might return nil.
1 parent f05b942 commit 7478835

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/debug/source_repository.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def add iseq, src
1616
def add_path path, src: nil
1717
case
1818
when src
19-
if File.file?(path)
19+
if path && File.file?(path)
2020
path = '(eval)' + path
2121
src = nil
2222
end

0 commit comments

Comments
 (0)