aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/time_with_zone.rb
diff options
context:
space:
mode:
authorDiego Carrion <dc.rec1@gmail.com>2011-03-04 12:04:22 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2011-03-04 16:50:24 -0200
commit7872cc992bac76e976334d0c20649d69aad5652e (patch)
treebe186d827453f22708daa059e6bf812de9400e9c /activesupport/lib/active_support/time_with_zone.rb
parent0db915efd1240f493c50b7b9f5d1ea5f1e3eec10 (diff)
downloadrails-7872cc992bac76e976334d0c20649d69aad5652e.tar.gz
rails-7872cc992bac76e976334d0c20649d69aad5652e.tar.bz2
rails-7872cc992bac76e976334d0c20649d69aad5652e.zip
refactored Time#<=> and DateTime#<=> by removing unnecessary calls without losing performance
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activesupport/lib/active_support/time_with_zone.rb')
-rw-r--r--activesupport/lib/active_support/time_with_zone.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index 3da216ac78..c66aa78ce8 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -281,7 +281,7 @@ module ActiveSupport
# A TimeWithZone acts like a Time, so just return +self+.
def to_time
- self
+ utc
end
def to_datetime