File: symbol.rb

package info (click to toggle)
ruby-introspection 0.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 172 kB
  • sloc: ruby: 643; 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