From b6a68737fb7f16fabff3a231e97adf42727e239a Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Sat, 17 Nov 2012 12:58:32 -0200 Subject: Remove return guard --- .../lib/active_record/attribute_methods/time_zone_conversion.rb | 3 +-- activerecord/test/cases/dirty_test.rb | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb index 806dc5b1d2..427c61079a 100644 --- a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb +++ b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb @@ -64,8 +64,7 @@ module ActiveRecord private def round_usec(value) - return unless value - value.change(:usec => 0) + value.change(usec: 0) if value end end end diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb index 40f1dbccde..a6a7b2d528 100644 --- a/activerecord/test/cases/dirty_test.rb +++ b/activerecord/test/cases/dirty_test.rb @@ -121,7 +121,6 @@ class DirtyTest < ActiveRecord::TestCase end def test_time_attributes_changes_without_time_zone - target = Class.new(ActiveRecord::Base) target.table_name = 'pirates' -- cgit v1.2.3