From c01f31f43c870bd9a828ae96207de0c2cdd8fd08 Mon Sep 17 00:00:00 2001 From: Isaac Betesh Date: Wed, 8 Feb 2017 11:20:38 -0500 Subject: Allow ActiveRecord::Base.as_json to accept a frozen Hash --- activerecord/lib/active_record/serialization.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/serialization.rb b/activerecord/lib/active_record/serialization.rb index 5a408e7b8e..db2bd0b55e 100644 --- a/activerecord/lib/active_record/serialization.rb +++ b/activerecord/lib/active_record/serialization.rb @@ -9,7 +9,7 @@ module ActiveRecord #:nodoc: end def serializable_hash(options = nil) - options = options.try(:clone) || {} + options = options.try(:dup) || {} options[:except] = Array(options[:except]).map(&:to_s) options[:except] |= Array(self.class.inheritance_column) -- cgit v1.2.3