File: symbol.rb

package info (click to toggle)
ruby-instantiator 0.0.6%2Bgit9cbbe70-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch, wheezy
  • size: 152 kB
  • ctags: 101
  • sloc: ruby: 269; makefile: 2
file content (6 lines) | stat: -rw-r--r-- 239 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
class Symbol
  # Standard in ruby 1.8.7+. See official documentation[http://ruby-doc.org/core-1.9/classes/Symbol.html]
  def to_proc
    Proc.new { |*args| args.shift.__send__(self, *args) }
  end unless :to_proc.respond_to?(:to_proc)
end