Skip to content

Commit e6031f1

Browse files
authored
Merge pull request #2655 from ruby/silence-string-deprecation
Update `string.rbs` to avoid deprecation warning in Steep
2 parents 9163aac + 1e41843 commit e6031f1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

core/string.rbs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3580,4 +3580,15 @@ interface _ArefFromStringToString
35803580
end
35813581

35823582
%a{deprecated}
3583-
type String::encode_fallback = Hash[String, String] | Proc | Method | _ArefFromStringToString
3583+
type String::encode_fallback = Hash[String, String] | Proc | Method | String::_ArefFromStringToString
3584+
3585+
# Don't use this interface directly
3586+
#
3587+
# This is a copy of `::_ArefFromStringToString` but without deprecated attribute.
3588+
# This is a workaround to avoid deprecation warnings in `String::encode_fallback` type.
3589+
#
3590+
# This type will be deprecated soon once `::_ArefFromStringToString` and `String::encode_fallback` are removed.
3591+
#
3592+
interface String::_ArefFromStringToString
3593+
def []: (String) -> String
3594+
end

0 commit comments

Comments
 (0)