Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
soutaro committed Dec 6, 2023
1 parent 0c561b8 commit c189a40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/stdlib/String_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand All @@ -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'

Expand Down

0 comments on commit c189a40

Please sign in to comment.