diff options
author | shotat <shotat@users.noreply.github.com> | 2017-06-15 11:45:15 +0900 |
---|---|---|
committer | shotat <shotat@users.noreply.github.com> | 2017-06-15 11:45:15 +0900 |
commit | b2999d631fb6b61c62b975e4cfe86727b42c1a70 (patch) | |
tree | e79bb6892f12b27c6729bf2f8970481768a58f5a /activemodel | |
parent | 2396f79fec607657b61eef329a98c4debcaa88c7 (diff) | |
download | rails-b2999d631fb6b61c62b975e4cfe86727b42c1a70.tar.gz rails-b2999d631fb6b61c62b975e4cfe86727b42c1a70.tar.bz2 rails-b2999d631fb6b61c62b975e4cfe86727b42c1a70.zip |
add frozen string literal comment
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/attribute_assignment.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |