* time.c (time_arg): use the year argument as-is. [ruby-dev:38194]

* lib/time.rb (Time.parse): interpret small year 0..99 as 1950..2049.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-04-21 16:43:15 +00:00
parent 7930673c5d
commit 16dc9e04cb
5 changed files with 27 additions and 19 deletions

View file

@ -219,8 +219,6 @@ class TestTime < Test::Unit::TestCase
def test_utc_or_local
assert_equal(T2000, Time.gm(2000))
assert_equal(T2000, Time.gm(0, 0, 0, 1, 1, 2000, :foo, :bar, false, :baz))
assert_equal(T2000, Time.gm(0))
assert_equal(T2000, Time.gm(100))
assert_equal(T2000, Time.gm(2000, "jan"))
assert_equal(T2000, Time.gm(2000, "1"))
assert_equal(T2000, Time.gm(2000, 1, 1, 0, 0, 0, 0))