aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/type/string.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/type/string.rb')
-rw-r--r--activemodel/lib/active_model/type/string.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/activemodel/lib/active_model/type/string.rb b/activemodel/lib/active_model/type/string.rb
index 4c8dc15778..8a91410998 100644
--- a/activemodel/lib/active_model/type/string.rb
+++ b/activemodel/lib/active_model/type/string.rb
@@ -12,12 +12,7 @@ module ActiveModel
private
def cast_value(value)
- result = super
- if ::String === result
- ::String.new(result)
- else
- result
- end
+ ::String.new(super)
end
end
end