From c189a40b129dca4c8f2e23e67bffeff1a65e6376 Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Wed, 6 Dec 2023 17:12:37 +0900 Subject: [PATCH] Fix test --- test/stdlib/String_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/stdlib/String_test.rb b/test/stdlib/String_test.rb index 6559baec2..b96c018aa 100644 --- a/test/stdlib/String_test.rb +++ b/test/stdlib/String_test.rb @@ -375,7 +375,7 @@ def test_byteslice end def test_bytesplice - omit_if 'String#bytesplice was added in 3.2' unless RUBY_VERSION >= '3.2' + omit_if(RUBY_VERSION < '3.2', 'String#bytesplice was added in 3.2') # In 3.3 and onwards (and backported to 3.2.16), the return type is `self`. This variable # is in case the test suite is run in a version under 3.2.16; tests for the variants only @@ -384,7 +384,7 @@ def test_bytesplice with_string ', world! :-D' do |string| with_int 1 do |start| with_int 2 do |length| - assert_send_type "(int, int, string) -> #{String}", + assert_send_type "(int, int, string) -> String", +'hello', :bytesplice, start, length, string next if RUBY_VERSION < '3.3' @@ -399,8 +399,8 @@ def test_bytesplice end with_range with_int(1).and_nil, with_int(2).and_nil do |range| - assert_send_type "(range[int?], string) -> String", - +'hello', :bytesplice, range, string + assert_send_type "(range[int?], string) -> String", + +'hello', :bytesplice, range, string next if RUBY_VERSION < '3.3'