aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/sqlite3
diff options
context:
space:
mode:
authorPat Allan <pat@freelancing-gods.com>2017-06-20 19:43:21 +1000
committerPat Allan <pat@freelancing-gods.com>2017-06-20 19:43:21 +1000
commitb86e313df53ada181850a057e254052f38014738 (patch)
tree41531a72563ec51568ca703aa0284acb689a75e0 /activerecord/test/cases/adapters/sqlite3
parent4ff30d9bb6d5d591fbb3952112d721c995059302 (diff)
downloadrails-b86e313df53ada181850a057e254052f38014738.tar.gz
rails-b86e313df53ada181850a057e254052f38014738.tar.bz2
rails-b86e313df53ada181850a057e254052f38014738.zip
Make ActiveRecord frozen string literal friendly.
Diffstat (limited to 'activerecord/test/cases/adapters/sqlite3')
-rw-r--r--activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
index 9a812e325e..cf0c37f70c 100644
--- a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
+++ b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
@@ -165,7 +165,7 @@ module ActiveRecord
data binary
)
eosql
- str = "\x80".force_encoding("ASCII-8BIT")
+ str = "\x80".dup.force_encoding("ASCII-8BIT")
binary = DualEncoding.new name: "いただきます!", data: str
binary.save!
assert_equal str, binary.data
@@ -174,7 +174,7 @@ module ActiveRecord
end
def test_type_cast_should_not_mutate_encoding
- name = "hello".force_encoding(Encoding::ASCII_8BIT)
+ name = "hello".dup.force_encoding(Encoding::ASCII_8BIT)
Owner.create(name: name)
assert_equal Encoding::ASCII_8BIT, name.encoding
ensure