diff options
author | Étienne Barrié <[email protected]> | 2024-10-21 12:04:56 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2024-10-26 18:44:15 +0900 |
commit | 82f7550f65f9872f6d7bff1a876395c23bbd7fc1 (patch) | |
tree | 5261ada8c5ac71532dc0501ee0ff1a2c03aef835 /test/json/json_parser_test.rb | |
parent | 5f9746895847be1e2dd202207d7a12f3f556294c (diff) |
Use frozen string literals
Co-authored-by: Jean Boussier <[email protected]>
Diffstat (limited to 'test/json/json_parser_test.rb')
-rw-r--r-- | test/json/json_parser_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/json/json_parser_test.rb b/test/json/json_parser_test.rb index e04b0c93a5..7197522def 100644 --- a/test/json/json_parser_test.rb +++ b/test/json/json_parser_test.rb @@ -1,5 +1,4 @@ -# encoding: utf-8 -# frozen_string_literal: false +# frozen_string_literal: true require_relative 'test_helper' require 'stringio' require 'tempfile' @@ -36,7 +35,8 @@ class JSONParserTest < Test::Unit::TestCase pend if RUBY_ENGINE == 'truffleruby' bug10705 = '[ruby-core:67386] [Bug #10705]' - json = ".\"\xE2\x88\x9A\"".force_encoding(Encoding::UTF_8) + json = ".\"\xE2\x88\x9A\"" + assert_equal(Encoding::UTF_8, json.encoding) e = assert_raise(JSON::ParserError) { JSON::Ext::Parser.new(json).parse } |