diff --git a/core/integer.rbs b/core/integer.rbs index f20d26d39..a8d16e83b 100644 --- a/core/integer.rbs +++ b/core/integer.rbs @@ -128,7 +128,7 @@ class Integer < Numeric # # Raises an exception if `numeric` is negative. # - def self.sqrt: (int n) -> Integer + def self.sqrt: (int object) -> Integer # # Returns `true` if `self` is numerically equal to `other`; `false` otherwise. @@ -389,7 +386,7 @@ class Integer < Numeric # # Related: Integer#eql? (requires `other` to be an Integer). # - def ==: (untyped) -> bool + def ==: (untyped other) -> bool # # Returns `1`. # - def denominator: () -> Integer + def denominator: () -> 1 # # Returns a string containing the place-value representation of `self` in radix @@ -916,14 +899,14 @@ class Integer < Numeric # 3.lcm(-7) #=> 21 # ((1<<31)-1).lcm((1<<61)-1) #=> 4951760154835678088235319297 # - def lcm: (Integer) -> Integer + def lcm: (Integer other_int) -> Integer # # - def magnitude: () -> Integer + alias magnitude abs # # Returns `self` modulo `other` as a real number. @@ -951,8 +934,6 @@ class Integer < Numeric # alias modulo % - def negative?: () -> bool - # # Returns the successor integer of `self` (equivalent to `self + 1`): # @@ -961,7 +942,7 @@ class Integer < Numeric # # Related: Integer#pred (predecessor value). # - def next: () -> Integer + alias next succ # # Returns `self`. # - def numerator: () -> Integer + def numerator: () -> self # # Returns `self`; intended for compatibility to character literals in Ruby 1.9. # - def ord: () -> Integer - - alias phase angle - - def polar: () -> [ Integer, Integer | Float ] - - def positive?: () -> bool + def ord: () -> self # # Returns `self` (which is already an Integer). # - def to_i: () -> Integer + def to_i: () -> self # # Returns `self` (which is already an Integer). # - alias to_int to_i + def to_int: () -> self #