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

This commit is contained in:
Yukihiro "Matz" Matsumoto
2018-11-25 06:03:30 +09:00
parent e2e6554b56
commit 7ed9bb3bd3
+1 -1
View File
@@ -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