ruby-changes:36771
From: headius <ko1@a...>
Date: Tue, 16 Dec 2014 04:59:25 +0900 (JST)
Subject: [ruby-changes:36771] headius:r48852 (trunk): * test/ruby/test_time.rb: Add test for getlocal(nil). See
headius 2014-12-16 04:59:12 +0900 (Tue, 16 Dec 2014) New Revision: 48852 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48852 Log: * test/ruby/test_time.rb: Add test for getlocal(nil). See jruby/jruby#2310. Modified files: trunk/test/ruby/test_time.rb Index: test/ruby/test_time.rb =================================================================== --- test/ruby/test_time.rb (revision 48851) +++ test/ruby/test_time.rb (revision 48852) @@ -1032,4 +1032,15 @@ class TestTime < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_time.rb#L1032 } 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/