ruby-changes:35370
From: nobu <ko1@a...>
Date: Mon, 8 Sep 2014 17:10:56 +0900 (JST)
Subject: [ruby-changes:35370] nobu:r47452 (trunk): test_time_tz.rb: have_tz_offset?
nobu 2014-09-08 17:10:37 +0900 (Mon, 08 Sep 2014) New Revision: 47452 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47452 Log: test_time_tz.rb: have_tz_offset? * test/ruby/test_time_tz.rb (TestTimeTZ::Util#have_tz_offset?): append ?-suffix as a predicate method. Modified files: trunk/test/ruby/test_time_tz.rb Index: test/ruby/test_time_tz.rb =================================================================== --- test/ruby/test_time_tz.rb (revision 47451) +++ test/ruby/test_time_tz.rb (revision 47452) @@ -35,7 +35,7 @@ class TestTimeTZ < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_time_tz.rb#L35 end module Util - def have_tz_offset(tz) + def have_tz_offset?(tz) with_tz(tz) {!Time.now.utc_offset.zero?} end @@ -81,8 +81,8 @@ class TestTimeTZ < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_time_tz.rb#L81 include Util extend Util - has_right_tz &&= have_tz_offset("right/America/Los_Angeles") - has_lisbon_tz &&= have_tz_offset("Europe/Lisbon") + has_right_tz &&= have_tz_offset?("right/America/Los_Angeles") + has_lisbon_tz &&= have_tz_offset?("Europe/Lisbon") def time_to_s(t) t.to_s -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/