Fix indentation in two Ruby files

This commit is contained in:
John Bampton
2023-10-14 18:52:30 +10:00
parent 4656ea5ccd
commit a83d7d3510
2 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -820,7 +820,7 @@ class Array
return to_enum(:combination, n) unless block
size = self.size
if n == 0
yield []
yield []
elsif n == 1
i = 0
while i<size
+7 -7
View File
@@ -140,9 +140,9 @@ class Set
end
end
def disjoint?(set)
!intersect?(set)
end
def disjoint?(set)
!intersect?(set)
end
def each(&block)
return to_enum :each unless block_given?
@@ -190,10 +190,10 @@ class Set
end
def collect!
return to_enum :collect! unless block_given?
set = self.class.new
each { |o| set << yield(o) }
replace(set)
return to_enum :collect! unless block_given?
set = self.class.new
each { |o| set << yield(o) }
replace(set)
end
alias map! collect!