diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-09-19 21:34:36 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-09-19 21:34:36 -0700 |
commit | 2004ef2044eae3922dbedf77a7e5f9b73a211a23 (patch) | |
tree | e05daf45f46294f728d83787ce0bd5ba9d76e098 /activerecord/lib | |
parent | 71b88518f7c84466f90b3d39fba61281bb782748 (diff) | |
parent | 3aef5ce9b35a4659379201eb6bb1dba355a83ba4 (diff) | |
download | rails-2004ef2044eae3922dbedf77a7e5f9b73a211a23.tar.gz rails-2004ef2044eae3922dbedf77a7e5f9b73a211a23.tar.bz2 rails-2004ef2044eae3922dbedf77a7e5f9b73a211a23.zip |
Merge pull request #7631 from jeremyevans/patch-1
Freeze columns before using them as hash keys
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/result.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/result.rb b/activerecord/lib/active_record/result.rb index 2414a4bbd7..5011a0d75d 100644 --- a/activerecord/lib/active_record/result.rb +++ b/activerecord/lib/active_record/result.rb @@ -11,7 +11,7 @@ module ActiveRecord attr_reader :columns, :rows, :column_types def initialize(columns, rows, column_types = {}) - @columns = columns + @columns = columns.map{|c| c.freeze} @rows = rows @hash_rows = nil @column_types = column_types |