Skip to content

Commit 056b1e8

Browse files
committed
Ruby: add some basic tests
1 parent 9be2512 commit 056b1e8

3 files changed

Lines changed: 358 additions & 0 deletions

File tree

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
getAnAncestorExpr
2+
| tst.rb:8:1:11:3 | C2 | tst.rb:8:12:8:13 | C1 |
3+
| tst.rb:27:1:35:3 | C3 | tst.rb:27:12:27:13 | C2 |
4+
| tst.rb:27:1:35:3 | C3 | tst.rb:28:13:28:17 | Mixin |
5+
| tst.rb:27:1:35:3 | C3 | tst.rb:29:13:29:18 | Mixin2 |
6+
| tst.rb:41:5:42:7 | N1::XY1 | tst.rb:41:17:41:20 | Y |
7+
| tst.rb:44:9:45:11 | N1::N2::XY2 | tst.rb:44:21:44:24 | Y |
8+
| tst.rb:49:1:51:3 | N2 | tst.rb:50:13:50:13 | X |
9+
| tst.rb:53:5:54:7 | N2::XY3 | tst.rb:53:17:53:17 | Y |
10+
getAnAncestor
11+
| file://:0:0:0:0 | Array | file://:0:0:0:0 | Array |
12+
| file://:0:0:0:0 | Array | file://:0:0:0:0 | BasicObject |
13+
| file://:0:0:0:0 | Array | file://:0:0:0:0 | Kernel |
14+
| file://:0:0:0:0 | Array | file://:0:0:0:0 | Object |
15+
| file://:0:0:0:0 | BasicObject | file://:0:0:0:0 | BasicObject |
16+
| file://:0:0:0:0 | Class | file://:0:0:0:0 | BasicObject |
17+
| file://:0:0:0:0 | Class | file://:0:0:0:0 | Class |
18+
| file://:0:0:0:0 | Class | file://:0:0:0:0 | Kernel |
19+
| file://:0:0:0:0 | Class | file://:0:0:0:0 | Module |
20+
| file://:0:0:0:0 | Class | file://:0:0:0:0 | Object |
21+
| file://:0:0:0:0 | Complex | file://:0:0:0:0 | BasicObject |
22+
| file://:0:0:0:0 | Complex | file://:0:0:0:0 | Complex |
23+
| file://:0:0:0:0 | Complex | file://:0:0:0:0 | Kernel |
24+
| file://:0:0:0:0 | Complex | file://:0:0:0:0 | Numeric |
25+
| file://:0:0:0:0 | Complex | file://:0:0:0:0 | Object |
26+
| file://:0:0:0:0 | FalseClass | file://:0:0:0:0 | BasicObject |
27+
| file://:0:0:0:0 | FalseClass | file://:0:0:0:0 | FalseClass |
28+
| file://:0:0:0:0 | FalseClass | file://:0:0:0:0 | Kernel |
29+
| file://:0:0:0:0 | FalseClass | file://:0:0:0:0 | Object |
30+
| file://:0:0:0:0 | Float | file://:0:0:0:0 | BasicObject |
31+
| file://:0:0:0:0 | Float | file://:0:0:0:0 | Float |
32+
| file://:0:0:0:0 | Float | file://:0:0:0:0 | Kernel |
33+
| file://:0:0:0:0 | Float | file://:0:0:0:0 | Numeric |
34+
| file://:0:0:0:0 | Float | file://:0:0:0:0 | Object |
35+
| file://:0:0:0:0 | Hash | file://:0:0:0:0 | BasicObject |
36+
| file://:0:0:0:0 | Hash | file://:0:0:0:0 | Hash |
37+
| file://:0:0:0:0 | Hash | file://:0:0:0:0 | Kernel |
38+
| file://:0:0:0:0 | Hash | file://:0:0:0:0 | Object |
39+
| file://:0:0:0:0 | Integer | file://:0:0:0:0 | BasicObject |
40+
| file://:0:0:0:0 | Integer | file://:0:0:0:0 | Integer |
41+
| file://:0:0:0:0 | Integer | file://:0:0:0:0 | Kernel |
42+
| file://:0:0:0:0 | Integer | file://:0:0:0:0 | Numeric |
43+
| file://:0:0:0:0 | Integer | file://:0:0:0:0 | Object |
44+
| file://:0:0:0:0 | Kernel | file://:0:0:0:0 | Kernel |
45+
| file://:0:0:0:0 | Module | file://:0:0:0:0 | BasicObject |
46+
| file://:0:0:0:0 | Module | file://:0:0:0:0 | Kernel |
47+
| file://:0:0:0:0 | Module | file://:0:0:0:0 | Module |
48+
| file://:0:0:0:0 | Module | file://:0:0:0:0 | Object |
49+
| file://:0:0:0:0 | NilClass | file://:0:0:0:0 | BasicObject |
50+
| file://:0:0:0:0 | NilClass | file://:0:0:0:0 | Kernel |
51+
| file://:0:0:0:0 | NilClass | file://:0:0:0:0 | NilClass |
52+
| file://:0:0:0:0 | NilClass | file://:0:0:0:0 | Object |
53+
| file://:0:0:0:0 | Numeric | file://:0:0:0:0 | BasicObject |
54+
| file://:0:0:0:0 | Numeric | file://:0:0:0:0 | Kernel |
55+
| file://:0:0:0:0 | Numeric | file://:0:0:0:0 | Numeric |
56+
| file://:0:0:0:0 | Numeric | file://:0:0:0:0 | Object |
57+
| file://:0:0:0:0 | Object | file://:0:0:0:0 | BasicObject |
58+
| file://:0:0:0:0 | Object | file://:0:0:0:0 | Kernel |
59+
| file://:0:0:0:0 | Object | file://:0:0:0:0 | Object |
60+
| file://:0:0:0:0 | Proc | file://:0:0:0:0 | Proc |
61+
| file://:0:0:0:0 | Rational | file://:0:0:0:0 | BasicObject |
62+
| file://:0:0:0:0 | Rational | file://:0:0:0:0 | Kernel |
63+
| file://:0:0:0:0 | Rational | file://:0:0:0:0 | Numeric |
64+
| file://:0:0:0:0 | Rational | file://:0:0:0:0 | Object |
65+
| file://:0:0:0:0 | Rational | file://:0:0:0:0 | Rational |
66+
| file://:0:0:0:0 | String | file://:0:0:0:0 | BasicObject |
67+
| file://:0:0:0:0 | String | file://:0:0:0:0 | Kernel |
68+
| file://:0:0:0:0 | String | file://:0:0:0:0 | Object |
69+
| file://:0:0:0:0 | String | file://:0:0:0:0 | String |
70+
| file://:0:0:0:0 | Symbol | file://:0:0:0:0 | Symbol |
71+
| file://:0:0:0:0 | TrueClass | file://:0:0:0:0 | BasicObject |
72+
| file://:0:0:0:0 | TrueClass | file://:0:0:0:0 | Kernel |
73+
| file://:0:0:0:0 | TrueClass | file://:0:0:0:0 | Object |
74+
| file://:0:0:0:0 | TrueClass | file://:0:0:0:0 | TrueClass |
75+
| tst.rb:1:1:6:3 | C1 | file://:0:0:0:0 | BasicObject |
76+
| tst.rb:1:1:6:3 | C1 | file://:0:0:0:0 | Kernel |
77+
| tst.rb:1:1:6:3 | C1 | file://:0:0:0:0 | Object |
78+
| tst.rb:1:1:6:3 | C1 | tst.rb:1:1:6:3 | C1 |
79+
| tst.rb:8:1:11:3 | C2 | file://:0:0:0:0 | BasicObject |
80+
| tst.rb:8:1:11:3 | C2 | file://:0:0:0:0 | Kernel |
81+
| tst.rb:8:1:11:3 | C2 | file://:0:0:0:0 | Object |
82+
| tst.rb:8:1:11:3 | C2 | tst.rb:1:1:6:3 | C1 |
83+
| tst.rb:8:1:11:3 | C2 | tst.rb:8:1:11:3 | C2 |
84+
| tst.rb:13:1:18:3 | Mixin | tst.rb:13:1:18:3 | Mixin |
85+
| tst.rb:20:1:25:3 | Mixin2 | tst.rb:20:1:25:3 | Mixin2 |
86+
| tst.rb:27:1:35:3 | C3 | file://:0:0:0:0 | BasicObject |
87+
| tst.rb:27:1:35:3 | C3 | file://:0:0:0:0 | Kernel |
88+
| tst.rb:27:1:35:3 | C3 | file://:0:0:0:0 | Object |
89+
| tst.rb:27:1:35:3 | C3 | tst.rb:1:1:6:3 | C1 |
90+
| tst.rb:27:1:35:3 | C3 | tst.rb:8:1:11:3 | C2 |
91+
| tst.rb:27:1:35:3 | C3 | tst.rb:13:1:18:3 | Mixin |
92+
| tst.rb:27:1:35:3 | C3 | tst.rb:20:1:25:3 | Mixin2 |
93+
| tst.rb:27:1:35:3 | C3 | tst.rb:27:1:35:3 | C3 |
94+
| tst.rb:40:1:47:3 | N1 | tst.rb:40:1:47:3 | N1 |
95+
| tst.rb:41:5:42:7 | N1::XY1 | file://:0:0:0:0 | BasicObject |
96+
| tst.rb:41:5:42:7 | N1::XY1 | file://:0:0:0:0 | Kernel |
97+
| tst.rb:41:5:42:7 | N1::XY1 | file://:0:0:0:0 | Object |
98+
| tst.rb:41:5:42:7 | N1::XY1 | tst.rb:41:5:42:7 | N1::XY1 |
99+
| tst.rb:43:5:46:7 | N1::N2 | tst.rb:43:5:46:7 | N1::N2 |
100+
| tst.rb:44:9:45:11 | N1::N2::XY2 | file://:0:0:0:0 | BasicObject |
101+
| tst.rb:44:9:45:11 | N1::N2::XY2 | file://:0:0:0:0 | Kernel |
102+
| tst.rb:44:9:45:11 | N1::N2::XY2 | file://:0:0:0:0 | Object |
103+
| tst.rb:44:9:45:11 | N1::N2::XY2 | tst.rb:44:9:45:11 | N1::N2::XY2 |
104+
| tst.rb:49:1:51:3 | N2 | tst.rb:49:1:51:3 | N2 |
105+
| tst.rb:53:5:54:7 | N2::XY3 | file://:0:0:0:0 | BasicObject |
106+
| tst.rb:53:5:54:7 | N2::XY3 | file://:0:0:0:0 | Kernel |
107+
| tst.rb:53:5:54:7 | N2::XY3 | file://:0:0:0:0 | Object |
108+
| tst.rb:53:5:54:7 | N2::XY3 | tst.rb:53:5:54:7 | N2::XY3 |
109+
| tst.rb:57:1:62:3 | Nodes | file://:0:0:0:0 | BasicObject |
110+
| tst.rb:57:1:62:3 | Nodes | file://:0:0:0:0 | Kernel |
111+
| tst.rb:57:1:62:3 | Nodes | file://:0:0:0:0 | Object |
112+
| tst.rb:57:1:62:3 | Nodes | tst.rb:57:1:62:3 | Nodes |
113+
getModuleLevelSelf
114+
| tst.rb:13:1:18:3 | Mixin | tst.rb:13:1:18:3 | self (Mixin) |
115+
| tst.rb:20:1:25:3 | Mixin2 | tst.rb:20:1:25:3 | self (Mixin2) |
116+
| tst.rb:27:1:35:3 | C3 | tst.rb:27:1:35:3 | self (C3) |
117+
| tst.rb:49:1:51:3 | N2 | tst.rb:49:1:51:3 | self (N2) |
118+
getAnImmediateReference
119+
| file://:0:0:0:0 | Array | tst.rb:59:15:59:21 | Array |
120+
| file://:0:0:0:0 | Hash | tst.rb:60:14:60:45 | Hash |
121+
| tst.rb:1:1:6:3 | C1 | tst.rb:8:12:8:13 | C1 |
122+
| tst.rb:8:1:11:3 | C2 | tst.rb:27:12:27:13 | C2 |
123+
| tst.rb:13:1:18:3 | Mixin | tst.rb:28:13:28:17 | Mixin |
124+
| tst.rb:20:1:25:3 | Mixin2 | tst.rb:29:13:29:18 | Mixin2 |
125+
| tst.rb:27:1:35:3 | C3 | tst.rb:37:5:37:6 | C3 |
126+
getOwnInstanceMethod
127+
| tst.rb:1:1:6:3 | C1 | c1 | tst.rb:2:5:5:7 | c1 |
128+
| tst.rb:8:1:11:3 | C2 | c2 | tst.rb:9:5:10:7 | c2 |
129+
| tst.rb:13:1:18:3 | Mixin | m1 | tst.rb:14:5:15:7 | m1 |
130+
| tst.rb:20:1:25:3 | Mixin2 | m2 | tst.rb:21:5:22:7 | m2 |
131+
| tst.rb:57:1:62:3 | Nodes | m1 | tst.rb:58:5:61:7 | m1 |
132+
getInstanceMethod
133+
| tst.rb:1:1:6:3 | C1 | c1 | tst.rb:2:5:5:7 | c1 |
134+
| tst.rb:8:1:11:3 | C2 | c1 | tst.rb:2:5:5:7 | c1 |
135+
| tst.rb:8:1:11:3 | C2 | c2 | tst.rb:9:5:10:7 | c2 |
136+
| tst.rb:13:1:18:3 | Mixin | m1 | tst.rb:14:5:15:7 | m1 |
137+
| tst.rb:20:1:25:3 | Mixin2 | m2 | tst.rb:21:5:22:7 | m2 |
138+
| tst.rb:27:1:35:3 | C3 | c1 | tst.rb:2:5:5:7 | c1 |
139+
| tst.rb:27:1:35:3 | C3 | c2 | tst.rb:9:5:10:7 | c2 |
140+
| tst.rb:27:1:35:3 | C3 | m1 | tst.rb:14:5:15:7 | m1 |
141+
| tst.rb:27:1:35:3 | C3 | m2 | tst.rb:21:5:22:7 | m2 |
142+
| tst.rb:57:1:62:3 | Nodes | m1 | tst.rb:58:5:61:7 | m1 |
143+
getAnOwnInstanceSelf
144+
| tst.rb:1:1:6:3 | C1 | tst.rb:2:5:5:7 | self in c1 |
145+
| tst.rb:8:1:11:3 | C2 | tst.rb:9:5:10:7 | self in c2 |
146+
| tst.rb:13:1:18:3 | Mixin | tst.rb:14:5:15:7 | self in m1 |
147+
| tst.rb:20:1:25:3 | Mixin2 | tst.rb:21:5:22:7 | self in m2 |
148+
| tst.rb:57:1:62:3 | Nodes | tst.rb:58:5:61:7 | self in m1 |
149+
getAnInstanceSelf
150+
| tst.rb:1:1:6:3 | C1 | tst.rb:2:5:5:7 | self in c1 |
151+
| tst.rb:8:1:11:3 | C2 | tst.rb:2:5:5:7 | self in c1 |
152+
| tst.rb:8:1:11:3 | C2 | tst.rb:9:5:10:7 | self in c2 |
153+
| tst.rb:13:1:18:3 | Mixin | tst.rb:14:5:15:7 | self in m1 |
154+
| tst.rb:20:1:25:3 | Mixin2 | tst.rb:21:5:22:7 | self in m2 |
155+
| tst.rb:27:1:35:3 | C3 | tst.rb:2:5:5:7 | self in c1 |
156+
| tst.rb:27:1:35:3 | C3 | tst.rb:9:5:10:7 | self in c2 |
157+
| tst.rb:27:1:35:3 | C3 | tst.rb:14:5:15:7 | self in m1 |
158+
| tst.rb:27:1:35:3 | C3 | tst.rb:21:5:22:7 | self in m2 |
159+
| tst.rb:57:1:62:3 | Nodes | tst.rb:58:5:61:7 | self in m1 |
160+
getOwnSingletonMethod
161+
| tst.rb:13:1:18:3 | Mixin | m1s | tst.rb:16:5:17:7 | m1s |
162+
| tst.rb:20:1:25:3 | Mixin2 | m2s | tst.rb:23:5:24:7 | m2s |
163+
| tst.rb:27:1:35:3 | C3 | c3_self1 | tst.rb:32:9:33:11 | c3_self1 |
164+
| tst.rb:27:1:35:3 | C3 | c3_self2 | tst.rb:37:1:38:3 | c3_self2 |
165+
getAnOwnInstanceVariableRead
166+
| tst.rb:1:1:6:3 | C1 | @field | tst.rb:4:9:4:14 | @field |
167+
getAnOwnInstanceVariableWriteValue
168+
| tst.rb:1:1:6:3 | C1 | @field | tst.rb:3:18:3:18 | 1 |
169+
getCanonicalEnclosingModule
170+
| tst.rb:41:5:42:7 | N1::XY1 | tst.rb:40:1:47:3 | N1 |
171+
| tst.rb:43:5:46:7 | N1::N2 | tst.rb:40:1:47:3 | N1 |
172+
| tst.rb:44:9:45:11 | N1::N2::XY2 | tst.rb:43:5:46:7 | N1::N2 |
173+
| tst.rb:53:5:54:7 | N2::XY3 | tst.rb:49:1:51:3 | N2 |
174+
getCanonicalNestedModule
175+
| tst.rb:40:1:47:3 | N1 | N2 | tst.rb:43:5:46:7 | N1::N2 |
176+
| tst.rb:40:1:47:3 | N1 | XY1 | tst.rb:41:5:42:7 | N1::XY1 |
177+
| tst.rb:43:5:46:7 | N1::N2 | XY2 | tst.rb:44:9:45:11 | N1::N2::XY2 |
178+
| tst.rb:49:1:51:3 | N2 | XY3 | tst.rb:53:5:54:7 | N2::XY3 |
179+
getTopLevelConst
180+
| Array | tst.rb:59:15:59:21 | Array |
181+
| C1 | tst.rb:1:1:6:3 | C1 |
182+
| C1 | tst.rb:8:12:8:13 | C1 |
183+
| C2 | tst.rb:8:1:11:3 | C2 |
184+
| C2 | tst.rb:27:12:27:13 | C2 |
185+
| C3 | tst.rb:27:1:35:3 | self (C3) |
186+
| C3 | tst.rb:37:5:37:6 | C3 |
187+
| Hash | tst.rb:60:14:60:45 | Hash |
188+
| Mixin | tst.rb:13:1:18:3 | self (Mixin) |
189+
| Mixin | tst.rb:28:13:28:17 | Mixin |
190+
| Mixin2 | tst.rb:20:1:25:3 | self (Mixin2) |
191+
| Mixin2 | tst.rb:29:13:29:18 | Mixin2 |
192+
| N1 | tst.rb:40:1:47:3 | N1 |
193+
| N2 | tst.rb:43:5:46:7 | N2 |
194+
| N2 | tst.rb:49:1:51:3 | self (N2) |
195+
| N2 | tst.rb:52:1:55:3 | N2 |
196+
| Nodes | tst.rb:57:1:62:3 | Nodes |
197+
| X | tst.rb:41:17:41:17 | X |
198+
| X | tst.rb:44:21:44:21 | X |
199+
| X | tst.rb:50:13:50:13 | X |
200+
| XY1 | tst.rb:41:5:42:7 | XY1 |
201+
| XY2 | tst.rb:44:9:45:11 | XY2 |
202+
| XY3 | tst.rb:53:5:54:7 | XY3 |
203+
| Y | tst.rb:53:17:53:17 | Y |
204+
getConst
205+
| tst.rb:41:17:41:17 | X | Y | tst.rb:41:17:41:20 | Y |
206+
| tst.rb:44:21:44:21 | X | Y | tst.rb:44:21:44:24 | Y |
207+
| tst.rb:50:13:50:13 | X | X | tst.rb:50:13:50:13 | X |
208+
| tst.rb:50:13:50:13 | X | XY3 | tst.rb:53:5:54:7 | XY3 |
209+
| tst.rb:50:13:50:13 | X | Y | tst.rb:53:17:53:17 | Y |
210+
getXYClasses
211+
| tst.rb:41:5:42:7 | N1::XY1 |
212+
| tst.rb:44:9:45:11 | N1::N2::XY2 |
213+
| tst.rb:53:5:54:7 | N2::XY3 |
214+
hashLiteralNode
215+
| tst.rb:60:14:60:45 | call to [] |
216+
hashLiteralKey
217+
| tst.rb:60:14:60:45 | call to [] | bar | tst.rb:60:36:60:36 | 2 |
218+
| tst.rb:60:14:60:45 | call to [] | baz | tst.rb:60:44:60:44 | 3 |
219+
| tst.rb:60:14:60:45 | call to [] | foo | tst.rb:60:24:60:24 | 1 |
220+
arrayLiteralNode
221+
| tst.rb:59:15:59:21 | call to [] |
222+
arrayLiteralElement
223+
| tst.rb:59:15:59:21 | call to [] | tst.rb:59:16:59:16 | 1 |
224+
| tst.rb:59:15:59:21 | call to [] | tst.rb:59:18:59:18 | 2 |
225+
| tst.rb:59:15:59:21 | call to [] | tst.rb:59:20:59:20 | 3 |
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import ruby
2+
3+
query DataFlow::Node getAnAncestorExpr(DataFlow::ModuleNode mod) {
4+
result = mod.getAnAncestorExpr()
5+
}
6+
7+
query DataFlow::ModuleNode getAnAncestor(DataFlow::ModuleNode mod) { result = mod.getAnAncestor() }
8+
9+
query DataFlow::Node getModuleLevelSelf(DataFlow::ModuleNode mod) {
10+
result = mod.getModuleLevelSelf()
11+
}
12+
13+
query DataFlow::Node getAnImmediateReference(DataFlow::ModuleNode mod) {
14+
result = mod.getAnImmediateReference()
15+
}
16+
17+
query DataFlow::MethodNode getOwnInstanceMethod(DataFlow::ModuleNode mod, string name) {
18+
result = mod.getOwnInstanceMethod(name)
19+
}
20+
21+
query DataFlow::MethodNode getInstanceMethod(DataFlow::ModuleNode mod, string name) {
22+
result = mod.getInstanceMethod(name)
23+
}
24+
25+
query DataFlow::Node getAnOwnInstanceSelf(DataFlow::ModuleNode mod) {
26+
result = mod.getAnOwnInstanceSelf()
27+
}
28+
29+
query DataFlow::Node getAnInstanceSelf(DataFlow::ModuleNode mod) {
30+
result = mod.getAnInstanceSelf()
31+
}
32+
33+
query DataFlow::Node getOwnSingletonMethod(DataFlow::ModuleNode mod, string name) {
34+
result = mod.getOwnSingletonMethod(name)
35+
}
36+
37+
query DataFlow::Node getAnOwnInstanceVariableRead(DataFlow::ModuleNode mod, string name) {
38+
result = mod.getAnOwnInstanceVariableRead(name)
39+
}
40+
41+
query DataFlow::Node getAnOwnInstanceVariableWriteValue(DataFlow::ModuleNode mod, string name) {
42+
result = mod.getAnOwnInstanceVariableWriteValue(name)
43+
}
44+
45+
query DataFlow::ModuleNode getCanonicalEnclosingModule(DataFlow::ModuleNode mod) {
46+
result = mod.getCanonicalEnclosingModule()
47+
}
48+
49+
query DataFlow::ModuleNode getCanonicalNestedModule(DataFlow::ModuleNode mod, string name) {
50+
result = mod.getCanonicalNestedModule(name)
51+
}
52+
53+
query DataFlow::Node getTopLevelConst(string name) { result = DataFlow::getConst(name) }
54+
55+
query DataFlow::Node getConst(DataFlow::ConstRef base, string name) { result = base.getConst(name) }
56+
57+
query DataFlow::ModuleNode getXYClasses() {
58+
result = DataFlow::getConst("X").getConst("Y").getADescendentModule()
59+
}
60+
61+
query DataFlow::HashLiteralNode hashLiteralNode() { any() }
62+
63+
query DataFlow::Node hashLiteralKey(DataFlow::HashLiteralNode node, string key) {
64+
result = node.getElementFromKey(Ast::ConstantValue::getStringlikeValue(key))
65+
}
66+
67+
query DataFlow::ArrayLiteralNode arrayLiteralNode() { any() }
68+
69+
query DataFlow::Node arrayLiteralElement(DataFlow::ArrayLiteralNode node) {
70+
result = node.getAnElement()
71+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
module C1
2+
def c1
3+
@field = 1
4+
@field
5+
end
6+
end
7+
8+
class C2 < C1
9+
def c2
10+
end
11+
end
12+
13+
module Mixin
14+
def m1
15+
end
16+
def self.m1s
17+
end
18+
end
19+
20+
module Mixin2
21+
def m2
22+
end
23+
def self.m2s
24+
end
25+
end
26+
27+
class C3 < C2
28+
include Mixin
29+
prepend Mixin2
30+
31+
class << self
32+
def c3_self1
33+
end
34+
end
35+
end
36+
37+
def C3.c3_self2
38+
end
39+
40+
module N1
41+
class XY1 < X::Y
42+
end
43+
module N2
44+
class XY2 < X::Y
45+
end
46+
end
47+
end
48+
49+
module N2
50+
include X
51+
end
52+
module N2
53+
class XY3 < Y
54+
end
55+
end
56+
57+
class Nodes
58+
def m1
59+
array=[1,2,3]
60+
hash={'foo' => 1, 'bar' => 2, baz: 3}
61+
end
62+
end

0 commit comments

Comments
 (0)