mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Ruby: add more tests for singleton up/down calls
This commit is contained in:
@@ -213,6 +213,10 @@ getTarget
|
||||
| calls.rb:549:2:549:6 | call to new | calls.rb:117:5:117:16 | new |
|
||||
| calls.rb:549:20:549:24 | call to baz | calls.rb:51:5:57:7 | baz |
|
||||
| calls.rb:550:26:550:37 | call to capitalize | calls.rb:97:5:97:23 | capitalize |
|
||||
| calls.rb:557:5:557:13 | call to singleton | calls.rb:553:5:554:7 | singleton |
|
||||
| calls.rb:560:9:560:17 | call to singleton | calls.rb:553:5:554:7 | singleton |
|
||||
| calls.rb:561:9:561:18 | call to singleton2 | calls.rb:565:5:566:7 | singleton2 |
|
||||
| calls.rb:568:5:568:14 | call to mid_method | calls.rb:559:5:562:7 | mid_method |
|
||||
| hello.rb:12:5:12:24 | call to include | calls.rb:108:5:110:7 | include |
|
||||
| hello.rb:14:16:14:20 | call to hello | hello.rb:2:5:4:7 | hello |
|
||||
| hello.rb:20:16:20:20 | call to super | hello.rb:13:5:15:7 | message |
|
||||
@@ -335,6 +339,7 @@ unresolvedCall
|
||||
| calls.rb:549:1:549:26 | call to each |
|
||||
| calls.rb:550:1:550:13 | call to [] |
|
||||
| calls.rb:550:1:550:39 | call to each |
|
||||
| calls.rb:558:5:558:14 | call to singleton2 |
|
||||
| hello.rb:20:16:20:26 | ... + ... |
|
||||
| hello.rb:20:16:20:34 | ... + ... |
|
||||
| hello.rb:20:16:20:40 | ... + ... |
|
||||
@@ -440,6 +445,9 @@ publicMethod
|
||||
| calls.rb:485:5:487:7 | singleton |
|
||||
| calls.rb:526:5:531:7 | baz |
|
||||
| calls.rb:539:5:542:7 | baz |
|
||||
| calls.rb:553:5:554:7 | singleton |
|
||||
| calls.rb:559:5:562:7 | mid_method |
|
||||
| calls.rb:565:5:566:7 | singleton2 |
|
||||
| hello.rb:2:5:4:7 | hello |
|
||||
| hello.rb:5:5:7:7 | world |
|
||||
| hello.rb:13:5:15:7 | message |
|
||||
|
||||
@@ -548,3 +548,22 @@ ProtectedMethodsSub.new.baz
|
||||
|
||||
[C.new].each { |c| c.baz }
|
||||
["a","b","c"].each { |s| s.capitalize }
|
||||
|
||||
class SingletonUpCall_Base
|
||||
def self.singleton
|
||||
end
|
||||
end
|
||||
class SingletonUpCall_Sub < SingletonUpCall_Base
|
||||
singleton
|
||||
singleton2 # should not resolve
|
||||
def self.mid_method
|
||||
singleton
|
||||
singleton2 # should resolve
|
||||
end
|
||||
end
|
||||
class SingletonUpCall_SubSub < SingletonUpCall_Sub
|
||||
def self.singleton2
|
||||
end
|
||||
|
||||
mid_method
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user