New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preload to_datetime before freezing a TimeWithZone instance #28104

Merged
merged 1 commit into from Feb 22, 2017

Conversation

Projects
None yet
3 participants
@HashNotAdam

HashNotAdam commented Feb 22, 2017

Fixes #28101: after freezing an ActiveSupport::TimeWithZone instance, it is not possible to call to_datetime because the value is cached in an instance variable. To avoid this issue, the instance variable is preloaded before the freeze occurs.

@pixeltrix pixeltrix merged commit b6bc343 into rails:master Feb 22, 2017

2 checks passed

codeclimate no new or fixed issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@pixeltrix

This comment has been minimized.

Member

pixeltrix commented Feb 22, 2017

@HashNotAdam thanks 👍

pixeltrix added a commit that referenced this pull request Feb 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment