Skip to content

Commit 8ee0937

Browse files
committed
Avoid overloading where arguments are identical
1 parent 45b4356 commit 8ee0937

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

core/encoding.rbs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,8 +923,7 @@ class Encoding::Converter < Object
923923
# p ec.primitive_convert(src, dst, nil, 1) #=> :destination_buffer_full
924924
# p ec.last_error #=> nil
925925
#
926-
def last_error: () -> Encoding::InvalidByteSequenceError?
927-
| () -> Encoding::UndefinedConversionError?
926+
def last_error: () -> (InvalidByteSequenceError | UndefinedConversionError | nil)
928927

929928
# <!--
930929
# rdoc-file=transcode.c

core/range.rbs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,7 @@ class Range[out Elem] < Object
930930
#
931931
# Related: Range#count.
932932
#
933-
def size: () -> Integer?
934-
| () -> Float?
933+
def size: () -> (Integer | Float | nil)
935934

936935
# <!--
937936
# rdoc-file=range.c

stdlib/ripper/0/ripper.rbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ class Ripper
247247
# - to_a()
248248
# -->
249249
#
250-
def to_a: () -> [ [ Integer, Integer ], Symbol, String, Ripper::Lexer::State, String ]
251-
| () -> [ [ Integer, Integer ], Symbol, String, Ripper::Lexer::State ]
250+
def to_a: () -> ( [ [ Integer, Integer ], Symbol, String, Ripper::Lexer::State, String ]
251+
| [ [ Integer, Integer ], Symbol, String, Ripper::Lexer::State ] )
252252
end
253253

254254
class State

0 commit comments

Comments
 (0)