fix: Array#delete mistakingly calling block even if not passed

This commit is contained in:
leviongit
2024-05-09 14:33:23 +02:00
parent 19d9f48f7d
commit 67df0aca67
+1 -1
View File
@@ -193,7 +193,7 @@ class Array
def delete(key, &block)
len = self.length
ret = self.__delete(key)
return block.call() if len == self.length
return block&.call() if len == self.length
ret
end