1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* golf_prelude.rb (Symbol#call): new method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-03-03 15:00:04 +00:00
parent 4f8f4a9ee4
commit 2adbf720d5

View file

@ -112,3 +112,11 @@ class Enumerator
alias old_inspect inspect
alias inspect old_to_s
end
class Symbol
def call(*args, &block)
proc do |recv|
recv.__send__(self, *args, &block)
end
end
end