diff options
Diffstat (limited to 'activemodel/lib/active_model/type/immutable_string.rb')
-rw-r--r-- | activemodel/lib/active_model/type/immutable_string.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/activemodel/lib/active_model/type/immutable_string.rb b/activemodel/lib/active_model/type/immutable_string.rb index 75654e1334..58268540e5 100644 --- a/activemodel/lib/active_model/type/immutable_string.rb +++ b/activemodel/lib/active_model/type/immutable_string.rb @@ -17,11 +17,12 @@ module ActiveModel private def cast_value(value) - result = case value - when true then "t" - when false then "f" - else value.to_s - end + result = \ + case value + when true then "t" + when false then "f" + else value.to_s + end result.freeze end end |