Skip to content

Commit

Permalink
Use File.identical? to compare paths instead of computing realpath
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock authored and paracycle committed Sep 28, 2022
1 parent bce5419 commit 2af7354
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tapioca/runtime/trackers/constant_definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ConstantLocation < T::Struct
class << self
def build_constant_location(tp, locations)
file = resolve_loc(locations)
lineno = file == File.realpath(tp.path) ? tp.lineno : 0
lineno = File.identical?(file, tp.path) ? tp.lineno : 0

ConstantLocation.new(path: file, lineno: lineno)
end
Expand Down

0 comments on commit 2af7354

Please sign in to comment.