mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 18:43:59 +02:00
* 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:
parent
7930673c5d
commit
16dc9e04cb
5 changed files with 27 additions and 19 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue