Skip to content

Commit 085abf5

Browse files
committed
Ignore type error
1 parent b57063d commit 085abf5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/rbs/unit_test/with_aliases.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ def with_range(start, stop, exclude_end = false)
127127

128128
# `Range` requires `begin <=> end` to return non-nil, but doesn't actually
129129
# end up using the return value of it. This is to add that in when needed.
130-
def lower.<=>(rhs) = :not_nil unless defined? lower.<=>
130+
unless defined? lower.<=>
131+
def lower.<=>(rhs) = :not_nil # steep:ignore MethodDefinitionInUndeclaredModule
132+
end
131133

132134
# If `lower <=> rhs` is defined but nil, then that means we're going to be constructing
133135
# an illegal range (eg `3..ToInt.new(4)`). So, we need to skip yielding an invalid range

0 commit comments

Comments
 (0)