Make the test suite compatible with `--enable-frozen-string-literal`

Ref: https://bugs.ruby-lang.org/issues/20205
Ref: https://github.com/voxpupuli/json-schema/pull/508

Since `rbs` is tested as part of ruby-core CI, it needs to be compatible
with the `--enable-frozen-string-literal` option.
diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml
index 9f2ad2c..3bd5e60 100644
--- a/.github/workflows/ruby.yml
+++ b/.github/workflows/ruby.yml
@@ -14,6 +14,7 @@
       fail-fast: false
       matrix:
         ruby: ['3.0', '3.1', '3.2', '3.3', head]
+        rubyopt: [""]
         job:
           - test
         include:
@@ -22,6 +23,12 @@
           - ruby: "3.3"
             job: stdlib_test
           - ruby: "3.3"
+            job: test
+            rubyopt: "--enable-frozen-string-literal"
+          - ruby: "3.3"
+            job: stdlib_test
+            rubyopt: "--enable-frozen-string-literal"
+          - ruby: "3.3"
             job: lexer compile confirm_lexer
           - ruby: "3.3"
             job: rubocop validate test_doc build test_generate_stdlib
diff --git a/Gemfile.lock b/Gemfile.lock
index 889e226..df2db6a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -13,7 +13,7 @@
   remote: https://rubygems.org/
   specs:
     abbrev (0.1.2)
-    addressable (2.8.5)
+    addressable (2.8.6)
       public_suffix (>= 2.0.2, < 6.0)
     ast (2.4.2)
     dbm (1.1.0)
@@ -25,7 +25,7 @@
       rainbow (>= 3.0, < 4.0)
       strong_json (>= 1.1, < 2.2)
     json (2.7.1)
-    json-schema (4.1.1)
+    json-schema (4.2.0)
       addressable (>= 2.8)
     language_server-protocol (3.17.0.3)
     marcel (1.0.2)
@@ -41,7 +41,7 @@
     power_assert (2.0.3)
     psych (4.0.6)
       stringio
-    public_suffix (5.0.3)
+    public_suffix (5.0.4)
     racc (1.7.3)
     rainbow (3.1.1)
     rake (13.1.0)
diff --git a/test/stdlib/ARGF_test.rb b/test/stdlib/ARGF_test.rb
index bc9f2a9..dc7c3a8 100644
--- a/test/stdlib/ARGF_test.rb
+++ b/test/stdlib/ARGF_test.rb
@@ -263,7 +263,7 @@
     assert_send_type  "(::int length) -> ::String",
                       ARGF.class.new(__FILE__), :read, 1
     assert_send_type  "(::int length, ::string outbuf) -> ::String",
-                      ARGF.class.new(__FILE__), :read, 1, ""
+                      ARGF.class.new(__FILE__), :read, 1, +""
     assert_send_type  "(::int length) -> nil",
                       ARGF.class.new(Tempfile.new), :read, 1
   end
@@ -272,7 +272,7 @@
     assert_send_type  "(::int maxlen) -> ::String",
                       ARGF.class.new(__FILE__), :read_nonblock, 1
     assert_send_type  "(::int maxlen, ::string buf) -> ::String",
-                      ARGF.class.new(__FILE__), :read_nonblock, 1, ""
+                      ARGF.class.new(__FILE__), :read_nonblock, 1, +""
   end
 
   def test_readbyte
@@ -289,7 +289,7 @@
     assert_send_type  "(::int maxlen) -> ::String",
                       ARGF.class.new(__FILE__), :readpartial, 1
     assert_send_type  "(::int maxlen, ::string buf) -> ::String",
-                      ARGF.class.new(__FILE__), :readpartial, 1, ""
+                      ARGF.class.new(__FILE__), :readpartial, 1, +""
   end
 
   def test_rewind
diff --git a/test/stdlib/Array_test.rb b/test/stdlib/Array_test.rb
index 0dbc7ab..4c2342d 100644
--- a/test/stdlib/Array_test.rb
+++ b/test/stdlib/Array_test.rb
@@ -597,7 +597,7 @@
                      [1,2,3], :pack, ToStr.new("ccc")
 
     assert_send_type "(String, buffer: String) -> String",
-                     [1,2,3], :pack, "ccc", buffer: ""
+                     [1,2,3], :pack, "ccc", buffer: +""
     assert_send_type "(String, buffer: nil) -> String",
                      [1,2,3], :pack, "ccc", buffer: nil
     refute_send_type "(ToStr, buffer: ToStr) -> String",
diff --git a/test/stdlib/Encoding_test.rb b/test/stdlib/Encoding_test.rb
index 030dc2f..27faf8b 100644
--- a/test/stdlib/Encoding_test.rb
+++ b/test/stdlib/Encoding_test.rb
@@ -232,7 +232,7 @@
 
   def error_object
     ec = Encoding::Converter.new('UTF-8', 'ISO-8859-1')
-    ec.primitive_convert("\xf1abcd", '')
+    ec.primitive_convert(+"\xf1abcd", +'')
     ec.last_error
   end
 end
@@ -271,7 +271,7 @@
 
   def error_object
     ec = Encoding::Converter.new('EUC-JP', 'ISO-8859-1')
-    ec.primitive_convert("\xa4\xa2", '')
+    ec.primitive_convert(+"\xa4\xa2", +'')
     ec.last_error
   end
 end
diff --git a/test/stdlib/Enumerable_test.rb b/test/stdlib/Enumerable_test.rb
index 76d1d85..83f5aad 100644
--- a/test/stdlib/Enumerable_test.rb
+++ b/test/stdlib/Enumerable_test.rb
@@ -211,7 +211,7 @@
   end
 
   def test_inject
-    assert_send_type "(String init, Symbol method) -> untyped", TestEnumerable.new, :inject, '', :<<
+    assert_send_type "(String init, Symbol method) -> untyped", TestEnumerable.new, :inject, +'', :<<
     assert_send_type "(Symbol method) -> String", TestEnumerable.new, :inject, :+
     assert_send_type("(Integer initial) { (Integer, String) -> Integer } -> Integer", TestEnumerable.new, :inject, 0) do |memo, item|
       memo ^ item.hash
diff --git a/test/stdlib/IO_test.rb b/test/stdlib/IO_test.rb
index 962333e..47a9391 100644
--- a/test/stdlib/IO_test.rb
+++ b/test/stdlib/IO_test.rb
@@ -260,11 +260,11 @@
       assert_send_type "(nil) -> String",
                        io, :read, nil
       assert_send_type "(Integer, String) -> String",
-                       io, :read, 0, "buffer"
+                       io, :read, 0, +"buffer"
       assert_send_type "(Integer, String) -> nil",
-                       io, :read, 1, "buffer"
+                       io, :read, 1, +"buffer"
       assert_send_type "(nil, String) -> String",
-                       io, :read, nil, "buffer"
+                       io, :read, nil, +"buffer"
     end
   end
 
@@ -273,7 +273,7 @@
       assert_send_type "(Integer) -> String",
                        io, :readpartial, 10
       assert_send_type "(Integer, String) -> String",
-                       io, :readpartial, 10, "buffer"
+                       io, :readpartial, 10, +"buffer"
     end
   end
 
diff --git a/test/stdlib/ObjectSpace_test.rb b/test/stdlib/ObjectSpace_test.rb
index 3ae6be4..fd16696 100644
--- a/test/stdlib/ObjectSpace_test.rb
+++ b/test/stdlib/ObjectSpace_test.rb
@@ -23,9 +23,9 @@
 
   def test_define_finalizer
     assert_send_type "(top, ^(Integer) -> void) -> [Integer, Proc]",
-                     ObjectSpace, :define_finalizer, "abc", ->(id) { "id: #{id}" }
+                     ObjectSpace, :define_finalizer, +"abc", ->(id) { "id: #{id}" }
     assert_send_type "(top) { (Integer) -> void } -> [Integer, Proc]",
-                     ObjectSpace, :define_finalizer, "abc" do |id| "id: #{id}" end
+                     ObjectSpace, :define_finalizer, +"abc" do |id| "id: #{id}" end
   end
 
   def test_each_object
@@ -53,7 +53,7 @@
 
   def test_undefine_finalizer
     assert_send_type "(String) -> String",
-                     ObjectSpace, :undefine_finalizer, "abc"
+                     ObjectSpace, :undefine_finalizer, +"abc"
     assert_send_type "(Array) -> Array",
                      ObjectSpace, :undefine_finalizer, []
   end
diff --git a/test/stdlib/StringIO_test.rb b/test/stdlib/StringIO_test.rb
index 72881bf..a66a366 100644
--- a/test/stdlib/StringIO_test.rb
+++ b/test/stdlib/StringIO_test.rb
@@ -16,12 +16,12 @@
   end
 
   def test_close_write
-    io = StringIO.new('example')
+    io = StringIO.new(+'example')
     io.close_write
   end
 
   def test_closed_write?
-    io = StringIO.new('example')
+    io = StringIO.new(+'example')
     io.closed_write?
     io.close_write
     io.closed_write?
diff --git a/test/stdlib/String_test.rb b/test/stdlib/String_test.rb
index a3338e8..dcc4ec7 100644
--- a/test/stdlib/String_test.rb
+++ b/test/stdlib/String_test.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: false
 require_relative 'test_helper'
 
 # TODO: encode, encode!, byteslice
diff --git a/test/stdlib/test_helper.rb b/test/stdlib/test_helper.rb
index b731db3..e209829 100644
--- a/test/stdlib/test_helper.rb
+++ b/test/stdlib/test_helper.rb
@@ -54,7 +54,7 @@
   attr_reader :buffer
 
   def initialize
-    @buffer = ""
+    @buffer = +""
   end
 
   def write(*vals)