aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/persistence.rb
diff options
context:
space:
mode:
authorDan Erikson <derikson3@gmail.com>2013-04-02 21:37:16 -0600
committerkennyj <kennyj@gmail.com>2013-04-25 03:01:19 +0900
commit5bdd76fc3b83f9cf3320905daae390ced4e7bf33 (patch)
tree9492d530c17abefe3be179e91caadeeccb084fca /activerecord/lib/active_record/persistence.rb
parent4e7fa91332ea08aa29e69e905413abba78d93d78 (diff)
downloadrails-5bdd76fc3b83f9cf3320905daae390ced4e7bf33.tar.gz
rails-5bdd76fc3b83f9cf3320905daae390ced4e7bf33.tar.bz2
rails-5bdd76fc3b83f9cf3320905daae390ced4e7bf33.zip
Fix a SystemStackError that occurs when using time zone aware attributes.
This fixes issue #10066
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r--activerecord/lib/active_record/persistence.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb
index 42cece3ad0..59f8e90e7a 100644
--- a/activerecord/lib/active_record/persistence.rb
+++ b/activerecord/lib/active_record/persistence.rb
@@ -51,7 +51,7 @@ module ActiveRecord
# how this "single-table" inheritance mapping is implemented.
def instantiate(record, column_types = {})
klass = discriminate_class_for_record(record)
- column_types = klass.decorate_columns(column_types)
+ column_types = klass.decorate_columns(column_types.dup)
klass.allocate.init_with('attributes' => record, 'column_types' => column_types)
end