@@ -1099,13 +1099,27 @@ def test_lstrip
10991099 ' hello' , :lstrip
11001100 assert_send_type '() -> String' ,
11011101 'hello' , :lstrip
1102+
1103+ if_ruby ( "4.0" ...) do
1104+ with_string "0-9" do |selector |
1105+ assert_send_type '(String::selector) -> String' ,
1106+ "01234abc56789" , :lstrip , selector
1107+ end
1108+ end
11021109 end
11031110
11041111 def test_lstrip!
11051112 assert_send_type '() -> String' ,
11061113 +' hello' , :lstrip!
11071114 assert_send_type '() -> nil' ,
11081115 +'hello' , :lstrip!
1116+
1117+ if_ruby ( "4.0" ...) do
1118+ with_string "0-9" do |selector |
1119+ assert_send_type '(String::selector) -> String' ,
1120+ "01234abc56789" , :lstrip! , selector
1121+ end
1122+ end
11091123 end
11101124
11111125 def test_match
@@ -1252,13 +1266,27 @@ def test_rstrip
12521266 'hello ' , :rstrip
12531267 assert_send_type '() -> String' ,
12541268 'hello' , :rstrip
1269+
1270+ if_ruby ( "4.0" ...) do
1271+ with_string "0-9" do |selector |
1272+ assert_send_type '(String::selector) -> String' ,
1273+ "01234abc56789" , :rstrip , selector
1274+ end
1275+ end
12551276 end
12561277
12571278 def test_rstrip!
12581279 assert_send_type '() -> String' ,
12591280 +'hello ' , :rstrip!
12601281 assert_send_type '() -> nil' ,
12611282 +'hello' , :rstrip!
1283+
1284+ if_ruby ( "4.0" ...) do
1285+ with_string "0-9" do |selector |
1286+ assert_send_type '(String::selector) -> String' ,
1287+ "01234abc56789" , :rstrip! , selector
1288+ end
1289+ end
12621290 end
12631291
12641292 def test_scan
@@ -1491,13 +1519,27 @@ def test_strip
14911519 ' hello ' , :strip
14921520 assert_send_type '() -> String' ,
14931521 'hello' , :strip
1522+
1523+ if_ruby ( "4.0" ...) do
1524+ with_string "0-9" do |selector |
1525+ assert_send_type '(String::selector) -> String' ,
1526+ "01234abc56789" , :strip , selector
1527+ end
1528+ end
14941529 end
14951530
14961531 def test_strip!
14971532 assert_send_type '() -> String' ,
14981533 ' hello ' , :strip!
14991534 assert_send_type '() -> nil' ,
15001535 'hello' , :strip!
1536+
1537+ if_ruby ( "4.0" ...) do
1538+ with_string "0-9" do |selector |
1539+ assert_send_type '(String::selector) -> String' ,
1540+ "01234abc56789" , :strip! , selector
1541+ end
1542+ end
15011543 end
15021544
15031545 def test_sub
0 commit comments