mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
1 changed files with 11 additions and 0 deletions
|
@ -1032,4 +1032,15 @@ class TestTime < Test::Unit::TestCase
|
|||
}
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue