aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorAdam Rice <arice@Adams-MacBook-Pro-8.local>2017-02-22 14:16:59 +1100
committerAdam Rice <arice@Adams-MacBook-Pro-8.local>2017-02-22 14:16:59 +1100
commit6560448b460f16db196efe42d5fc3d51b27ea651 (patch)
tree2da14918fe2b3caf3e3fabf164a20d8e0de77467 /activesupport/lib/active_support
parent8de68078f4b55ed574d795cece38c2943642b95e (diff)
downloadrails-6560448b460f16db196efe42d5fc3d51b27ea651.tar.gz
rails-6560448b460f16db196efe42d5fc3d51b27ea651.tar.bz2
rails-6560448b460f16db196efe42d5fc3d51b27ea651.zip
Preload to_datetime before freezing a TimeWithZone instance
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/time_with_zone.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index 889f71c4f3..857cc1a664 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -427,7 +427,8 @@ module ActiveSupport
end
def freeze
- period; utc; time # preload instance variables before freezing
+ # preload instance variables before freezing
+ period; utc; time; to_datetime
super
end