From d58ec11945a1f8bd26bb6d61a7e2c2f983350930 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 15 Oct 2024 14:52:17 +0900 Subject: [PATCH] [Bug #20797] Yet another test --- spec/ruby/core/time/new_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/ruby/core/time/new_spec.rb b/spec/ruby/core/time/new_spec.rb index 9b3e4f90f3..fa5b5c56d6 100644 --- a/spec/ruby/core/time/new_spec.rb +++ b/spec/ruby/core/time/new_spec.rb @@ -634,6 +634,12 @@ describe "Time.new with a timezone argument" do -> { Time.new("2020-12-25 00:56:17 +23:61") }.should raise_error(ArgumentError, /utc_offset/) + + ruby_bug '#20797', ''...'3.4' do + -> { + Time.new("2020-12-25 00:56:17 +00:23:61") + }.should raise_error(ArgumentError, /utc_offset/) + end end it "raises ArgumentError if string has not ascii-compatible encoding" do