File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -587,12 +587,12 @@ def test__parse_odd_offset
587587
588588 def test__parse_too_long_year
589589 str = "Jan 1" + "0" * 100_000
590- h = Timeout . timeout ( 1 ) { Date . _parse ( str ) }
590+ h = Timeout . timeout ( 1 ) { Date . _parse ( str , limit : 100_010 ) }
591591 assert_equal ( 100_000 , Math . log10 ( h [ :year ] ) )
592592 assert_equal ( 1 , h [ :mon ] )
593593
594594 str = "Jan - 1" + "0" * 100_000
595- h = Timeout . timeout ( 1 ) { Date . _parse ( str ) }
595+ h = Timeout . timeout ( 1 ) { Date . _parse ( str , limit : 100_010 ) }
596596 assert_equal ( 1 , h [ :mon ] )
597597 assert_not_include ( h , :year )
598598 end
@@ -1309,6 +1309,5 @@ def test_length_limit
13091309 assert_raise ( ArgumentError ) { DateTime . jisx0301 ( "1" * 1000 ) }
13101310
13111311 assert_raise ( ArgumentError ) { Date . _parse ( "Jan " + "9" * 1000000 ) }
1312- assert_raise ( Timeout ::Error ) { Timeout . timeout ( 1 ) { Date . _parse ( "Jan " + "9" * 1000000 , limit : nil ) } }
13131312 end
13141313end
You can’t perform that action at this time.
0 commit comments