Skip to content

Commit d4f8193

Browse files
authored
Merge pull request #2597 from ksss/drop-unnecessary-plus-at
Just use `Numeric#+@` and return self
2 parents 8670334 + 22ba636 commit d4f8193

File tree

5 files changed

+2
-10
lines changed

5 files changed

+2
-10
lines changed

core/complex.rbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,6 @@ class Complex < Numeric
221221
#
222222
def +: (Numeric) -> Complex
223223

224-
def +@: () -> Complex
225-
226224
# <!--
227225
# rdoc-file=complex.c
228226
# - complex - numeric -> new_complex

core/float.rbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ class Float < Numeric
153153
def +: (Complex) -> Complex
154154
| (Numeric) -> Float
155155

156-
def +@: () -> Float
157-
158156
# <!--
159157
# rdoc-file=numeric.c
160158
# - self - other -> numeric

core/integer.rbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,6 @@ class Integer < Numeric
246246
| (Rational) -> Rational
247247
| (Complex) -> Complex
248248

249-
def +@: () -> Integer
250-
251249
# <!--
252250
# rdoc-file=numeric.c
253251
# - self - numeric -> numeric_result

core/numeric.rbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class Numeric
201201
# -->
202202
# Returns `self`.
203203
#
204-
def +@: () -> Numeric
204+
def +@: () -> self
205205

206206
# Performs subtraction: the class of the resulting object depends on the class
207207
# of `numeric`.
@@ -214,7 +214,7 @@ class Numeric
214214
# -->
215215
# Unary Minus---Returns the receiver, negated.
216216
#
217-
def -@: () -> Numeric
217+
def -@: () -> self
218218

219219
# <!--
220220
# rdoc-file=numeric.c

core/rational.rbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ class Rational < Numeric
9999
| (Complex) -> Complex
100100
| (Numeric) -> Rational
101101

102-
def +@: () -> Rational
103-
104102
# <!--
105103
# rdoc-file=rational.c
106104
# - rat - numeric -> numeric

0 commit comments

Comments
 (0)