mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
fix: Array#delete mistakingly calling block even if not passed
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user