Add Hash#to_proc; CRuby2.3

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-10-18 10:18:43 +09:00
parent b5dfbce767
commit ce916b99b8
+4
View File
@@ -475,6 +475,10 @@ class Hash
self
end
def to_proc
->x{self[x]}
end
##
# call-seq:
# hsh.fetch_values(key, ...) -> array