@@ -1452,6 +1452,7 @@ def test_attr
1452
1452
c . instance_eval { attr_reader :"." }
1453
1453
end
1454
1454
1455
+ c = Class . new
1455
1456
assert_equal ( [ :a ] , c . class_eval { attr :a } )
1456
1457
assert_equal ( [ :b , :c ] , c . class_eval { attr :b , :c } )
1457
1458
assert_equal ( [ :d ] , c . class_eval { attr_reader :d } )
@@ -1460,6 +1461,16 @@ def test_attr
1460
1461
assert_equal ( [ :h= , :i= ] , c . class_eval { attr_writer :h , :i } )
1461
1462
assert_equal ( [ :j , :j= ] , c . class_eval { attr_accessor :j } )
1462
1463
assert_equal ( [ :k , :k= , :l , :l= ] , c . class_eval { attr_accessor :k , :l } )
1464
+
1465
+ c = Class . new
1466
+ assert_equal ( [ :a ] , c . class_eval { attr "a" } )
1467
+ assert_equal ( [ :b , :c ] , c . class_eval { attr "b" , "c" } )
1468
+ assert_equal ( [ :d ] , c . class_eval { attr_reader "d" } )
1469
+ assert_equal ( [ :e , :f ] , c . class_eval { attr_reader "e" , "f" } )
1470
+ assert_equal ( [ :g= ] , c . class_eval { attr_writer "g" } )
1471
+ assert_equal ( [ :h= , :i= ] , c . class_eval { attr_writer "h" , "i" } )
1472
+ assert_equal ( [ :j , :j= ] , c . class_eval { attr_accessor "j" } )
1473
+ assert_equal ( [ :k , :k= , :l , :l= ] , c . class_eval { attr_accessor "k" , "l" } )
1463
1474
end
1464
1475
1465
1476
def test_alias_method
0 commit comments