diff --git a/core/complex.rbs b/core/complex.rbs index 5126ab086..864d4e057 100644 --- a/core/complex.rbs +++ b/core/complex.rbs @@ -377,7 +377,7 @@ class Complex < Numeric # # Complex.rect(1, 2).conj # => (1-2i) # - def conj: () -> Complex + def conj: () -> self # # Returns the absolute value (magnitude) for `self`; see [polar # coordinates](rdoc-ref:Complex@Polar+Coordinates): @@ -745,8 +743,6 @@ class Complex < Numeric # def to_i: () -> Integer - alias to_int to_i - # diff --git a/core/float.rbs b/core/float.rbs index 0674b4a08..f96c403ad 100644 --- a/core/float.rbs +++ b/core/float.rbs @@ -324,12 +324,10 @@ class Float < Numeric # def abs: () -> Float - def abs2: () -> Float - # # Returns 0 if `self` is positive, Math::PI otherwise. # - def angle: () -> (Integer | Float) + def angle: ... # # Returns a string containing the place-value representation of `self` in radix # `base` (in 2..36). @@ -1027,8 +1015,6 @@ class Integer < Numeric # def ord: () -> Integer - alias phase angle - def polar: () -> [ Integer, Integer | Float ] def positive?: () -> bool @@ -1077,14 +1063,8 @@ class Integer < Numeric # def rationalize: (?Numeric eps) -> Rational - def real: () -> self - - def real?: () -> true - def rect: () -> [ Integer, Numeric ] - alias rectangular rect - # # Returns the square of `self`. # - def abs2: () -> Numeric + def abs2: () -> self # # Returns zero if `self` is positive, Math::PI otherwise. # - def angle: () -> Numeric + def angle: () -> (0 | Float) # + # Returns `self`. # - def conj: () -> Numeric + def conjugate: () -> self # - # Returns `self`. # - def conjugate: () -> Numeric + alias conj conjugate # # Returns `self`. # - def real: () -> Numeric + def real: () -> self # # Returns `true` if `self` is a real number (i.e. not Complex). # - def real?: () -> bool + def real?: () -> true # # Returns array `[self, 0]`. diff --git a/core/rational.rbs b/core/rational.rbs index d4ac6b757..7dd2bf13c 100644 --- a/core/rational.rbs +++ b/core/rational.rbs @@ -186,12 +186,6 @@ class Rational < Numeric # def abs: () -> Rational - def abs2: () -> Rational - - def angle: () -> (Integer | Float) - - alias arg angle - # # Returns the absolute value of `rat`. # @@ -337,8 +319,6 @@ class Rational < Numeric # def numerator: () -> Integer - alias phase angle - def polar: () -> [ Rational, Integer | Float ] #