aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/time_with_zone.rb
diff options
context:
space:
mode:
authorgbuesing <gbuesing@gmail.com>2008-10-19 22:33:26 -0500
committergbuesing <gbuesing@gmail.com>2008-10-19 22:33:26 -0500
commitc79f1d281f1932d4203c7b5b5c793e370ed63838 (patch)
tree94323897b40b2a4f49600a7694a9447c2df263e4 /activesupport/lib/active_support/time_with_zone.rb
parent93e1bff82a531c957bad91ea67e01b4793ccc51f (diff)
downloadrails-c79f1d281f1932d4203c7b5b5c793e370ed63838.tar.gz
rails-c79f1d281f1932d4203c7b5b5c793e370ed63838.tar.bz2
rails-c79f1d281f1932d4203c7b5b5c793e370ed63838.zip
TimeWithZone#freeze: preload instance variables so that we can actually freeze
Diffstat (limited to 'activesupport/lib/active_support/time_with_zone.rb')
-rw-r--r--activesupport/lib/active_support/time_with_zone.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index b7b8807c6d..a02cd81f72 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -277,9 +277,9 @@ module ActiveSupport
end
alias_method :kind_of?, :is_a?
- # Neuter freeze because freezing can cause problems with lazy loading of attributes.
def freeze
- self
+ period; utc; time # preload instance variables before freezing
+ super
end
def marshal_dump