From: "alexeymuranov (Alexey Muranov)" Date: 2013-11-08T04:55:05+09:00 Subject: [ruby-core:58226] [ruby-trunk - Feature #9095][Open] Allow `Symbol#to_proc` to take arguments Issue #9095 has been reported by alexeymuranov (Alexey Muranov). ---------------------------------------- Feature #9095: Allow `Symbol#to_proc` to take arguments https://bugs.ruby-lang.org/issues/9095 Author: alexeymuranov (Alexey Muranov) Status: Open Priority: Normal Assignee: Category: Target version: =begin After discussing #9076, i've decided to propose this: class Symbol def to_proc(*args) proc do |x| x.public_send(self, *args) end end end p = :+.to_proc(1) p[2] # => 3 [1, 2, 3, 4].map &:to_s.to_proc(2) #=> ["1", "10", "11", "100"] This would allow constructing more kinds of procs without using literal blocks. =end -- http://bugs.ruby-lang.org/