@@ -867,9 +867,7 @@ def test__iso8601
867
867
h = Date . _iso8601 ( nil )
868
868
assert_equal ( { } , h )
869
869
870
- h = assert_deprecated_warn { Date . _iso8601 ( '01-02-03T04:05:06Z' . to_sym ) }
871
- assert_equal ( [ 2001 , 2 , 3 , 4 , 5 , 6 , 0 ] ,
872
- h . values_at ( :year , :mon , :mday , :hour , :min , :sec , :offset ) )
870
+ assert_raise ( TypeError ) { Date . _iso8601 ( '01-02-03T04:05:06Z' . to_sym ) }
873
871
end
874
872
875
873
def test__rfc3339
@@ -889,9 +887,7 @@ def test__rfc3339
889
887
h = Date . _rfc3339 ( nil )
890
888
assert_equal ( { } , h )
891
889
892
- h = assert_deprecated_warn { Date . _rfc3339 ( '2001-02-03T04:05:06Z' . to_sym ) }
893
- assert_equal ( [ 2001 , 2 , 3 , 4 , 5 , 6 , 0 ] ,
894
- h . values_at ( :year , :mon , :mday , :hour , :min , :sec , :offset ) )
890
+ assert_raise ( TypeError ) { Date . _rfc3339 ( '2001-02-03T04:05:06Z' . to_sym ) }
895
891
end
896
892
897
893
def test__xmlschema
@@ -978,9 +974,7 @@ def test__xmlschema
978
974
h = Date . _xmlschema ( nil )
979
975
assert_equal ( { } , h )
980
976
981
- h = assert_deprecated_warn { Date . _xmlschema ( '2001-02-03' . to_sym ) }
982
- assert_equal ( [ 2001 , 2 , 3 , nil , nil , nil , nil ] ,
983
- h . values_at ( :year , :mon , :mday , :hour , :min , :sec , :offset ) )
977
+ assert_raise ( TypeError ) { Date . _xmlschema ( '2001-02-03' . to_sym ) }
984
978
end
985
979
986
980
def test__rfc2822
@@ -1017,9 +1011,7 @@ def test__rfc2822
1017
1011
h = Date . _rfc2822 ( nil )
1018
1012
assert_equal ( { } , h )
1019
1013
1020
- h = assert_deprecated_warn { Date . _rfc2822 ( 'Sat, 3 Feb 2001 04:05:06 UT' . to_sym ) }
1021
- assert_equal ( [ 2001 , 2 , 3 , 4 , 5 , 6 , 0 ] ,
1022
- h . values_at ( :year , :mon , :mday , :hour , :min , :sec , :offset ) )
1014
+ assert_raise ( TypeError ) { Date . _rfc2822 ( 'Sat, 3 Feb 2001 04:05:06 UT' . to_sym ) }
1023
1015
end
1024
1016
1025
1017
def test__httpdate
@@ -1044,9 +1036,7 @@ def test__httpdate
1044
1036
h = Date . _httpdate ( nil )
1045
1037
assert_equal ( { } , h )
1046
1038
1047
- h = assert_deprecated_warn { Date . _httpdate ( 'Sat, 03 Feb 2001 04:05:06 GMT' . to_sym ) }
1048
- assert_equal ( [ 2001 , 2 , 3 , 4 , 5 , 6 , 0 ] ,
1049
- h . values_at ( :year , :mon , :mday , :hour , :min , :sec , :offset ) )
1039
+ assert_raise ( TypeError ) { Date . _httpdate ( 'Sat, 03 Feb 2001 04:05:06 GMT' . to_sym ) }
1050
1040
end
1051
1041
1052
1042
def test__jisx0301
@@ -1127,9 +1117,7 @@ def test__jisx0301
1127
1117
h = Date . _jisx0301 ( nil )
1128
1118
assert_equal ( { } , h )
1129
1119
1130
- h = assert_deprecated_warn { Date . _jisx0301 ( 'H13.02.03T04:05:06.07+0100' . to_sym ) }
1131
- assert_equal ( [ 2001 , 2 , 3 , 4 , 5 , 6 , 3600 ] ,
1132
- h . values_at ( :year , :mon , :mday , :hour , :min , :sec , :offset ) )
1120
+ assert_raise ( TypeError ) { Date . _jisx0301 ( 'H13.02.03T04:05:06.07+0100' . to_sym ) }
1133
1121
end
1134
1122
1135
1123
def test_iso8601
0 commit comments