stdlib/date/0/date.rbs in rbs-1.7.1 vs stdlib/date/0/date.rbs in rbs-1.8.0
- old
+ new
@@ -444,11 +444,11 @@
# DateTime.new(2001,2,3) + Rational(-1,2)
# #=> #<DateTime: 2001-02-02T12:00:00+00:00 ...>
# DateTime.jd(0,12) + DateTime.new(2001,2,3).ajd
# #=> #<DateTime: 2001-02-03T00:00:00+00:00 ...>
#
- def +: (Integer | Rational other) -> Date
+ def +: ((Numeric & _ToR) other) -> Date
# Returns the difference between the two dates if the other is a date object.
# If the other is a numeric value, returns a date object pointing `other` days
# before self. If the other is a fractional number, assumes its precision is at
# most nanosecond.
@@ -459,10 +459,10 @@
# Date.new(2001,2,3) - Date.new(2001)
# #=> (33/1)
# DateTime.new(2001,2,3) - DateTime.new(2001,2,2,12)
# #=> (1/2)
#
- def -: (Integer | Rational other) -> Date
+ def -: ((Numeric & _ToR) other) -> Date
| (Date other) -> Rational
# Returns a date object pointing `n` months before self. The argument `n` should
# be a numeric value.
#