summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-23 07:56:43 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-23 07:56:43 +0900
commit3840791b7ebb2442724d96c69a791d0e678fbc6c (patch)
treeb7622392fd9cec08d095482534f44705c7f113b1 /test
parentbebe8d13f8e14dffa9d1828f6e9805773dc30518 (diff)
Get rid of error with frozen string literal
[Bug #14194]
Diffstat (limited to 'test')
-rw-r--r--test/-ext-/string/test_fstring.rb2
-rw-r--r--test/-ext-/symbol/noninterned_name.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/test/-ext-/string/test_fstring.rb b/test/-ext-/string/test_fstring.rb
index 1b3b15c..8612b5d 100644
--- a/test/-ext-/string/test_fstring.rb
+++ b/test/-ext-/string/test_fstring.rb
@@ -58,7 +58,7 @@ class Test_String_Fstring < Test::Unit::TestCase
end
def test_singleton_class
- str = noninterned_name.force_encoding("us-ascii")
+ str = noninterned_name
fstr = Bug::String.fstring(str)
assert_raise(TypeError) {fstr.singleton_class}
end
diff --git a/test/-ext-/symbol/noninterned_name.rb b/test/-ext-/symbol/noninterned_name.rb
index 7c9097a..d8b8fb0 100644
--- a/test/-ext-/symbol/noninterned_name.rb
+++ b/test/-ext-/symbol/noninterned_name.rb
@@ -1,3 +1,5 @@
+# frozen-string-literal: true
+
require "-test-/symbol"
module Test_Symbol