vendor/ruby-signature/stdlib/builtin/symbol.rbs in steep-0.14.0 vs vendor/ruby-signature/stdlib/builtin/symbol.rbs in steep-0.15.0
- old
+ new
@@ -45,12 +45,11 @@
#
# `nil` is returned if the two values are incomparable.
#
# See String#<=> for more information.
#
- def <=>: (Symbol other) -> Integer
- | (untyped other) -> Integer?
+ def <=>: (untyped other) -> Integer?
# Equality---If *sym* and *obj* are exactly the same symbol, returns `true`.
#
def ==: (untyped obj) -> bool
@@ -62,15 +61,15 @@
#
def =~: (untyped obj) -> Integer?
# Returns `sym.to_s[]`.
#
- def []: (Integer index) -> String?
- | (Integer start, Integer length) -> String?
+ def []: (int index) -> String?
+ | (int start, int length) -> String?
| (Range[Integer?] range) -> String?
| (Regexp regexp) -> String?
- | (Regexp regexp, Integer | String capture) -> String?
+ | (Regexp regexp, int | String capture) -> String?
| (String match_str) -> String?
# Same as `sym.to_s.capitalize.intern`.
#
def capitalize: () -> Symbol
@@ -91,12 +90,11 @@
# `other_symbol` is not a symbol.
#
# :foo.casecmp(2) #=> nil
# "\u{e4 f6 fc}".encode("ISO-8859-1").to_sym.casecmp(:"\u{c4 d6 dc}") #=> nil
#
- def casecmp: (Symbol other) -> Integer?
- | (untyped other) -> Integer?
+ def casecmp: (untyped other) -> Integer?
# Returns `true` if `sym` and `other_symbol` are equal after Unicode case
# folding, `false` if they are not equal.
#
# :aBcDeF.casecmp?(:abcde) #=> false
@@ -109,12 +107,11 @@
# `other_symbol` is not a symbol.
#
# :foo.casecmp?(2) #=> nil
# "\u{e4 f6 fc}".encode("ISO-8859-1").to_sym.casecmp?(:"\u{c4 d6 dc}") #=> nil
#
- def casecmp?: (Symbol other) -> bool
- | (untyped other) -> bool
+ def casecmp?: (untyped other) -> bool
# Same as `sym.to_s.downcase.intern`.
#
def downcase: () -> Symbol
| (:ascii | :fold | :lithuanian | :turkic) -> Symbol
@@ -135,11 +132,11 @@
#
# # returns true if one of the +suffixes+ matches.
# :hello.end_with?("heaven", "ello") #=> true
# :hello.end_with?("heaven", "paradise") #=> false
#
- def end_with?: (String str, *String str) -> bool
+ def end_with?: (*string suffixes) -> bool
# Returns the name or string corresponding to *sym*.
#
# :fred.id2name #=> "fred"
# :ginger.to_s #=> "ginger"
@@ -161,15 +158,16 @@
#
def length: () -> Integer
# Returns `sym.to_s.match`.
#
- def match: (Regexp | String pattern, ?Integer pos) ?{ (MatchData) -> void } -> MatchData?
+ def match: (Regexp | string pattern, ?int pos) -> MatchData?
+ | (Regexp | string pattern, ?int pos) { (MatchData) -> void } -> untyped
# Returns `sym.to_s.match?`.
#
- def match?: (Regexp | String pattern, ?Integer pos) -> bool
+ def match?: (Regexp | string pattern, ?int pos) -> bool
# Same as `sym.to_s.succ.intern`.
#
def next: () -> Symbol
@@ -188,10 +186,10 @@
# :hello.start_with?(/H/i) #=> true
#
# # returns true if one of the prefixes matches.
# :hello.start_with?("heaven", "hell") #=> true
# :hello.start_with?("heaven", "paradise") #=> false
- def start_with?: (String str, *String str) -> bool
+ def start_with?: (*string prefixes) -> bool
# Same as `sym.to_s.succ.intern`.
#
alias succ next