diff --git a/test/test_fiber.rb b/test/test_fiber.rb index 3657ea4d..175b7222 100644 --- a/test/test_fiber.rb +++ b/test/test_fiber.rb @@ -618,8 +618,15 @@ def test_inspect spin_line_no = __LINE__ + 1 f = spin(:baz) { :foo } + # Ruby 3.4.0 changed the format of the inspect string + method_name = if RUBY_VERSION < '3.4.0' + '`test_inspect\'' + else + '\'FiberTest#test_inspect\'' + end + expected = format( - '#', + "#", f.object_id, __FILE__, spin_line_no @@ -627,8 +634,9 @@ def test_inspect assert_equal expected, f.inspect f.await + expected = format( - '#', + "#", f.object_id, __FILE__, spin_line_no