Fix wrong number of arguments in `Array#fetch`; fix #4170

parent e2e6554b
No related merge requests found
......@@ -291,7 +291,7 @@ class Array
# #=> "100 is out of bounds"
#
def fetch(n=nil, ifnone=NONE, &block)
def fetch(n, ifnone=NONE, &block)
warn "block supersedes default value argument" if !n.nil? && ifnone != NONE && block
idx = n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment