From 2396f79fec607657b61eef329a98c4debcaa88c7 Mon Sep 17 00:00:00 2001 From: shotat Date: Wed, 14 Jun 2017 17:49:54 +0900 Subject: freeze string --- activemodel/lib/active_model/attribute_assignment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activemodel/lib') diff --git a/activemodel/lib/active_model/attribute_assignment.rb b/activemodel/lib/active_model/attribute_assignment.rb index a0a6de8dd7..f521e74f32 100644 --- a/activemodel/lib/active_model/attribute_assignment.rb +++ b/activemodel/lib/active_model/attribute_assignment.rb @@ -42,7 +42,7 @@ module ActiveModel end def _assign_attribute(k, v) - setter = "#{k}=" + setter = "#{k}=".freeze if respond_to?(setter) public_send(setter, v) else -- cgit v1.2.3