From b2999d631fb6b61c62b975e4cfe86727b42c1a70 Mon Sep 17 00:00:00 2001 From: shotat Date: Thu, 15 Jun 2017 11:45:15 +0900 Subject: add frozen string literal comment --- activemodel/lib/active_model/attribute_assignment.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/activemodel/lib/active_model/attribute_assignment.rb b/activemodel/lib/active_model/attribute_assignment.rb index f521e74f32..aa931119ff 100644 --- a/activemodel/lib/active_model/attribute_assignment.rb +++ b/activemodel/lib/active_model/attribute_assignment.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "active_support/core_ext/hash/keys" module ActiveModel @@ -42,7 +44,7 @@ module ActiveModel end def _assign_attribute(k, v) - setter = "#{k}=".freeze + setter = :"#{k}=" if respond_to?(setter) public_send(setter, v) else -- cgit v1.2.3