diff options
author | Pat Allan <pat@freelancing-gods.com> | 2017-06-20 19:43:21 +1000 |
---|---|---|
committer | Pat Allan <pat@freelancing-gods.com> | 2017-06-20 19:43:21 +1000 |
commit | b86e313df53ada181850a057e254052f38014738 (patch) | |
tree | 41531a72563ec51568ca703aa0284acb689a75e0 /activerecord/test/cases/attribute_test.rb | |
parent | 4ff30d9bb6d5d591fbb3952112d721c995059302 (diff) | |
download | rails-b86e313df53ada181850a057e254052f38014738.tar.gz rails-b86e313df53ada181850a057e254052f38014738.tar.bz2 rails-b86e313df53ada181850a057e254052f38014738.zip |
Make ActiveRecord frozen string literal friendly.
Diffstat (limited to 'activerecord/test/cases/attribute_test.rb')
-rw-r--r-- | activerecord/test/cases/attribute_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/attribute_test.rb b/activerecord/test/cases/attribute_test.rb index 7cf6b498c9..e856d551c0 100644 --- a/activerecord/test/cases/attribute_test.rb +++ b/activerecord/test/cases/attribute_test.rb @@ -76,7 +76,7 @@ module ActiveRecord end test "duping dups the value" do - @type.expect(:deserialize, "type cast", ["a value"]) + @type.expect(:deserialize, "type cast".dup, ["a value"]) attribute = Attribute.from_database(nil, "a value", @type) value_from_orig = attribute.value @@ -244,7 +244,7 @@ module ActiveRecord end test "with_type preserves mutations" do - attribute = Attribute.from_database(:foo, "", Type::Value.new) + attribute = Attribute.from_database(:foo, "".dup, Type::Value.new) attribute.value << "1" assert_equal 1, attribute.with_type(Type::Integer.new).value |