Skip to content

Commit

Permalink
Merge pull request #7631 from jeremyevans/patch-1
Browse files Browse the repository at this point in the history
Freeze columns before using them as hash keys
  • Loading branch information
tenderlove committed Sep 20, 2012
2 parents 71b8851 + 3aef5ce commit 2004ef2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Result
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
Expand Down

0 comments on commit 2004ef2

Please sign in to comment.