@@ -445,41 +445,39 @@ def obj.to_ary() [1, 2, 3] end
445
445
end
446
446
end
447
447
448
- ruby_version_is "2.6" do
449
- describe "Array#[]= with [m..]" do
450
- it "just sets the section defined by range to nil even if the rhs is nil" do
451
- a = [ 1 , 2 , 3 , 4 , 5 ]
452
- a [ eval ( "(2..)" ) ] = nil
453
- a . should == [ 1 , 2 , nil ]
454
- end
448
+ describe "Array#[]= with [m..]" do
449
+ it "just sets the section defined by range to nil even if the rhs is nil" do
450
+ a = [ 1 , 2 , 3 , 4 , 5 ]
451
+ a [ eval ( "(2..)" ) ] = nil
452
+ a . should == [ 1 , 2 , nil ]
453
+ end
455
454
456
- it "just sets the section defined by range to nil if m and n < 0 and the rhs is nil" do
457
- a = [ 1 , 2 , 3 , 4 , 5 ]
458
- a [ eval ( "(-3..)" ) ] = nil
459
- a . should == [ 1 , 2 , nil ]
460
- end
455
+ it "just sets the section defined by range to nil if m and n < 0 and the rhs is nil" do
456
+ a = [ 1 , 2 , 3 , 4 , 5 ]
457
+ a [ eval ( "(-3..)" ) ] = nil
458
+ a . should == [ 1 , 2 , nil ]
459
+ end
461
460
462
- it "replaces the section defined by range" do
463
- a = [ 6 , 5 , 4 , 3 , 2 , 1 ]
464
- a [ eval ( "(3...)" ) ] = 9
465
- a . should == [ 6 , 5 , 4 , 9 ]
466
- a [ eval ( "(2..)" ) ] = [ 7 , 7 , 7 ]
467
- a . should == [ 6 , 5 , 7 , 7 , 7 ]
468
- end
461
+ it "replaces the section defined by range" do
462
+ a = [ 6 , 5 , 4 , 3 , 2 , 1 ]
463
+ a [ eval ( "(3...)" ) ] = 9
464
+ a . should == [ 6 , 5 , 4 , 9 ]
465
+ a [ eval ( "(2..)" ) ] = [ 7 , 7 , 7 ]
466
+ a . should == [ 6 , 5 , 7 , 7 , 7 ]
467
+ end
469
468
470
- it "replaces the section if m and n < 0" do
471
- a = [ 1 , 2 , 3 , 4 , 5 ]
472
- a [ eval ( "(-3..)" ) ] = [ 7 , 8 , 9 ]
473
- a . should == [ 1 , 2 , 7 , 8 , 9 ]
474
- end
469
+ it "replaces the section if m and n < 0" do
470
+ a = [ 1 , 2 , 3 , 4 , 5 ]
471
+ a [ eval ( "(-3..)" ) ] = [ 7 , 8 , 9 ]
472
+ a . should == [ 1 , 2 , 7 , 8 , 9 ]
473
+ end
475
474
476
- it "inserts at the end if m > the array size" do
477
- a = [ 1 , 2 , 3 ]
478
- a [ eval ( "(3..)" ) ] = [ 4 ]
479
- a . should == [ 1 , 2 , 3 , 4 ]
480
- a [ eval ( "(5..)" ) ] = [ 6 ]
481
- a . should == [ 1 , 2 , 3 , 4 , nil , 6 ]
482
- end
475
+ it "inserts at the end if m > the array size" do
476
+ a = [ 1 , 2 , 3 ]
477
+ a [ eval ( "(3..)" ) ] = [ 4 ]
478
+ a . should == [ 1 , 2 , 3 , 4 ]
479
+ a [ eval ( "(5..)" ) ] = [ 6 ]
480
+ a . should == [ 1 , 2 , 3 , 4 , nil , 6 ]
483
481
end
484
482
end
485
483
0 commit comments