From 5c666779872e6702f4d826686eab09db37cba062 Mon Sep 17 00:00:00 2001
From: Aaron Patterson <aaron.patterson@gmail.com>
Date: Tue, 4 Jan 2011 17:29:40 -0800
Subject: make our yaml output consistent

---
 activesupport/lib/active_support/time_with_zone.rb | 6 +-----
 activesupport/test/core_ext/time_with_zone_test.rb | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)

(limited to 'activesupport')

diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index 6a7da8266c..8137f8e17e 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -138,11 +138,7 @@ module ActiveSupport
     end
 
     def to_yaml(options = {})
-      if options.kind_of?(YAML::Emitter)
-        utc.to_yaml(options)
-      else
-        time.to_yaml(options).gsub('Z', formatted_offset(true, 'Z'))
-      end
+      utc.to_yaml(options)
     end
 
     def httpdate
diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb
index 5579c27215..2b86da67fa 100644
--- a/activesupport/test/core_ext/time_with_zone_test.rb
+++ b/activesupport/test/core_ext/time_with_zone_test.rb
@@ -106,7 +106,7 @@ class TimeWithZoneTest < Test::Unit::TestCase
   end
 
   def test_to_yaml
-    assert_equal "--- 1999-12-31 19:00:00 -05:00\n", @twz.to_yaml
+    assert_equal "--- 2000-01-01 00:00:00 Z\n", @twz.to_yaml
   end
 
   def test_ruby_to_yaml
-- 
cgit v1.2.3