From 5697b2f013a6b0d13bcefef055c7349a526f2615 Mon Sep 17 00:00:00 2001 From: glass Date: Sun, 21 Sep 2014 16:58:47 +0000 Subject: * time.c: raise exception when minutes of utc_offset is out of 00-59. patch is from Kenichi Kamiya. [ruby-dev:47539] [Bug #8679] * test/ruby/test_time.rb: test for above. patch is from Kenichi Kamiya. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_time.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test') diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index 399242e4b7..a57cd5d72c 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -46,6 +46,7 @@ class TestTime < Test::Unit::TestCase tm = [2001,2,28,23,59,30] t = Time.new(*tm, "-12:00") assert_equal([2001,2,28,23,59,30,-43200], [t.year, t.month, t.mday, t.hour, t.min, t.sec, t.gmt_offset], bug4090) + assert_raise(ArgumentError) { Time.new(2000,1,1, 0,0,0, "+01:60") } end def test_time_add() -- cgit v1.2.3