codeql
codeql copied to clipboard
Ruby: Add type row for extends calls
A call to extend M adds all the instance methods of module M as class
methods to the receiver. For example:
module A
def f; end
end
class B
extend A
end
B.f # => targets A.f
To model this, we generate a typeModel row of the form
A, B!,
which can be interpreted as "the class B is an instance of the module
A". This is not strictly true, but means that class method calls on B
which are defined in A will be dispatched correctly.