aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorAndrew White <pixeltrix@users.noreply.github.com>2017-02-22 08:26:06 +0000
committerGitHub <noreply@github.com>2017-02-22 08:26:06 +0000
commitb6bc3433d18111dcddc8106e7745208fe2a9a10f (patch)
treea16fd9aa36d1af062b573dd0cb33c2aa5306145a /activesupport/lib
parentdf1faf601cb20b5728c95fc10e33b28ae6859bd8 (diff)
parent6560448b460f16db196efe42d5fc3d51b27ea651 (diff)
downloadrails-b6bc3433d18111dcddc8106e7745208fe2a9a10f.tar.gz
rails-b6bc3433d18111dcddc8106e7745208fe2a9a10f.tar.bz2
rails-b6bc3433d18111dcddc8106e7745208fe2a9a10f.zip
Merge pull request #28104 from HashNotAdam/fix/preload_instance_variables_in_freeze
Preload to_datetime before freezing a TimeWithZone instance
Diffstat (limited to 'activesupport/lib')
-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