summaryrefslogtreecommitdiff
path: root/test/ruby/test_time.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-24 13:22:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-24 13:22:22 +0000
commit28e48d3fd8b7e9ae4d540a0111342a444a9ac061 (patch)
tree2b98ff3bc2b5840ac43f1b8b1410fa93311c569f /test/ruby/test_time.rb
parent463633e4a934a00f869086a6ffbf84c6cb8ad630 (diff)
* time.c (time_init_1): Time.new will accept seconds as string or
int. [ruby-core:43569][Bug #6193] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_time.rb')
-rw-r--r--test/ruby/test_time.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb
index cf7aad38a2..e62aaf80c8 100644
--- a/test/ruby/test_time.rb
+++ b/test/ruby/test_time.rb
@@ -744,4 +744,11 @@ class TestTime < Test::Unit::TestCase
end
assert_equal("Insecure: can't modify #{tc}", error.message, bug5036)
end
+
+ def test_sec_str
+ bug6193 = '[ruby-core:43569]'
+ t = nil
+ assert_nothing_raised(bug6193) {t = Time.new(2012, 1, 2, 3, 4, "5")}
+ assert_equal(Time.new(2012, 1, 2, 3, 4, 5), t, bug6193)
+ end
end