File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -210,15 +210,17 @@ def resolve_loc(locations)
210
210
end
211
211
return unless resolved_loc
212
212
213
+ resolved_loc_path = resolved_loc . absolute_path || resolved_loc . path
214
+
213
215
# Find the location of the last frame in this file to get the most accurate line number.
214
- resolved_loc = locations . find { |loc | loc . absolute_path == resolved_loc . absolute_path }
216
+ resolved_loc = locations . find { |loc | loc . absolute_path == resolved_loc_path }
215
217
return unless resolved_loc
216
218
217
219
# If the last operation was a `require`, and we have no more frames,
218
220
# we are probably dealing with a C-method.
219
221
return if locations . first &.label == "require"
220
222
221
- file = resolved_loc . absolute_path || ""
223
+ file = resolved_loc . absolute_path || resolved_loc . path || ""
222
224
223
225
SourceLocation . from_loc ( [ file , resolved_loc . lineno ] )
224
226
end
You can’t perform that action at this time.
0 commit comments