Skip to content

Commit

Permalink
Reuse TracePoint#return_value
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock authored and paracycle committed Sep 28, 2022
1 parent b534af3 commit bce5419
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/tapioca/runtime/trackers/constant_definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ class ConstantLocation < T::Struct

Tapioca.register_trace(:c_return) do |tp|
next unless tp.method_id == :new
next unless Module === tp.return_value

key = tp.return_value
next unless Module === key

loc = build_constant_location(tp, caller_locations)
(@class_files[key] ||= Set.new) << loc
end
Expand Down

0 comments on commit bce5419

Please sign in to comment.