Freeze test string to be shared for sharable-middle-substring

This commit is contained in:
Nobuyoshi Nakada 2023-07-26 19:02:04 +09:00
parent af04e26924
commit 9f059d908c
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

View File

@ -24,7 +24,7 @@ class TestStringMemory < Test::Unit::TestCase
end
def test_byteslice_prefix
string = "a" * 100_000
string = ("a" * 100_000).freeze
allocations = capture_allocations(String) do
string.byteslice(0, 50_000)