From 957bb7cb81995f26c671afce0ee50a5c660e540e Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 29 Mar 2023 13:28:25 +0900 Subject: Merge Time-0.2.2 --- test/test_time.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/test_time.rb') diff --git a/test/test_time.rb b/test/test_time.rb index b50d8417cf..23e8e104a1 100644 --- a/test/test_time.rb +++ b/test/test_time.rb @@ -62,6 +62,15 @@ class TestTimeExtension < Test::Unit::TestCase # :nodoc: assert_equal(true, t.utc?) end + def test_rfc2822_nonlinear + pre = ->(n) {"0 Feb 00 00 :00" + " " * n} + assert_linear_performance([100, 500, 5000, 50_000], pre: pre) do |s| + assert_raise(ArgumentError) do + Time.rfc2822(s) + end + end + end + if defined?(Ractor) def test_rfc2822_ractor assert_ractor(<<~RUBY, require: 'time') -- cgit v1.2.3