* test/ruby/test_time.rb: Add test for getlocal(nil). See
jruby/jruby#2310. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a3450f4733
commit
0e590199f9
@ -1032,4 +1032,15 @@ class TestTime < Test::Unit::TestCase
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_getlocal_nil
|
||||||
|
now = Time.now
|
||||||
|
now2 = nil
|
||||||
|
now3 = nil
|
||||||
|
assert_nothing_raised {
|
||||||
|
now2 = now.getlocal
|
||||||
|
now3 = now.getlocal(nil)
|
||||||
|
}
|
||||||
|
assert_equal now2, now3
|
||||||
|
assert_equal now2.zone, now3.zone
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user