From 82f7550f65f9872f6d7bff1a876395c23bbd7fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Barri=C3=A9?= Date: Mon, 21 Oct 2024 12:04:56 +0200 Subject: Use frozen string literals Co-authored-by: Jean Boussier --- test/json/json_addition_test.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/json/json_addition_test.rb') diff --git a/test/json/json_addition_test.rb b/test/json/json_addition_test.rb index 3a7a58176a..8c3fbda56a 100644 --- a/test/json/json_addition_test.rb +++ b/test/json/json_addition_test.rb @@ -1,4 +1,4 @@ -#frozen_string_literal: false +# frozen_string_literal: true require_relative 'test_helper' require 'json/add/core' require 'json/add/complex' @@ -114,8 +114,7 @@ class JSONAdditionTest < Test::Unit::TestCase end def test_raw_strings - raw = '' - raw.respond_to?(:encode!) and raw.encode!(Encoding::ASCII_8BIT) + raw = ''.b raw_array = [] for i in 0..255 raw << i -- cgit v1.2.3