File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -302,16 +302,12 @@ def foo
302
302
end
303
303
end
304
304
305
- n_module = Module . new do
305
+ m_module = Module . new do
306
306
def foo
307
- 'n '
307
+ 'm '
308
308
end
309
309
end
310
310
311
- m_module = Module . new do
312
- include n_module
313
- end
314
-
315
311
b_class = Class . new ( a_class )
316
312
b = b_class . new
317
313
@@ -323,22 +319,26 @@ def foo
323
319
include m_module
324
320
end
325
321
326
- foo . call . should == 'n '
322
+ foo . call . should == 'm '
327
323
end
328
-
324
+
329
325
it "updates the method when a new module with nested module is included" do
330
326
a_class = Class . new do
331
327
def foo
332
328
'a'
333
329
end
334
330
end
335
331
336
- m_module = Module . new do
332
+ n_module = Module . new do
337
333
def foo
338
- 'm '
334
+ 'n '
339
335
end
340
336
end
341
337
338
+ m_module = Module . new do
339
+ include n_module
340
+ end
341
+
342
342
b_class = Class . new ( a_class )
343
343
b = b_class . new
344
344
@@ -350,7 +350,7 @@ def foo
350
350
include m_module
351
351
end
352
352
353
- foo . call . should == 'm '
353
+ foo . call . should == 'n '
354
354
end
355
355
end
356
356
You can’t perform that action at this time.
0 commit comments