diff options
author | Jason Weathered <jason@jasoncodes.com> | 2011-04-17 21:10:02 +1000 |
---|---|---|
committer | Jason Weathered <jason@jasoncodes.com> | 2011-04-17 21:10:02 +1000 |
commit | 96546bb63bd5f1b24f5126e7a3314580bc59584f (patch) | |
tree | e826c9edd2f5ae340bcf274a6c89600c07428a8f /activesupport/lib/active_support/core_ext/time | |
parent | b6843f22ac42b503f6b8ac00105ca0679049be7d (diff) | |
download | rails-96546bb63bd5f1b24f5126e7a3314580bc59584f.tar.gz rails-96546bb63bd5f1b24f5126e7a3314580bc59584f.tar.bz2 rails-96546bb63bd5f1b24f5126e7a3314580bc59584f.zip |
Fix marshal round-tripping of fractional seconds (Time#subsec).
Diffstat (limited to 'activesupport/lib/active_support/core_ext/time')
-rw-r--r-- | activesupport/lib/active_support/core_ext/time/marshal.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/time/marshal.rb b/activesupport/lib/active_support/core_ext/time/marshal.rb index 1a4d918ce7..457d3f5b62 100644 --- a/activesupport/lib/active_support/core_ext/time/marshal.rb +++ b/activesupport/lib/active_support/core_ext/time/marshal.rb @@ -37,6 +37,7 @@ if Time.local(2010).zone != Marshal.load(Marshal.dump(Time.local(2010))).zone time.instance_eval do if zone = defined?(@_zone) && remove_instance_variable('@_zone') ary = to_a + ary[0] += subsec if ary[0] == sec ary[-1] = zone utc? ? Time.utc(*ary) : Time.local(*ary) else |