mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Add Hash#to_proc; CRuby2.3
This commit is contained in:
@@ -475,6 +475,10 @@ class Hash
|
||||
self
|
||||
end
|
||||
|
||||
def to_proc
|
||||
->x{self[x]}
|
||||
end
|
||||
|
||||
##
|
||||
# call-seq:
|
||||
# hsh.fetch_values(key, ...) -> array
|
||||
|
||||
Reference in New Issue
Block a user