diff options
author | headius <headius@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-15 19:59:12 +0000 |
---|---|---|
committer | headius <headius@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-15 19:59:12 +0000 |
commit | 0e590199f9592fe6a513ecae18d0724f0e69260c (patch) | |
tree | 686bb5b89f558451396c10148040700b47ebf8f7 | |
parent | a3450f473382f091973d874128883a1cad04c1ba (diff) |
* 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
-rw-r--r-- | test/ruby/test_time.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index 97a5ce7bdf..d0ded0ddf2 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -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 |