aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/symbol.rb5
-rw-r--r--Library/Homebrew/global.rb1
2 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/symbol.rb b/Library/Homebrew/extend/symbol.rb
new file mode 100644
index 000000000..75a17b5ad
--- /dev/null
+++ b/Library/Homebrew/extend/symbol.rb
@@ -0,0 +1,5 @@
+class Symbol
+ def to_proc
+ proc { |obj, *args| obj.send(self, *args) }
+ end unless method_defined?(:to_proc)
+end
diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb
index 2bc26cf68..6440506f8 100644
--- a/Library/Homebrew/global.rb
+++ b/Library/Homebrew/global.rb
@@ -2,6 +2,7 @@ require 'extend/fileutils'
require 'extend/pathname'
require 'extend/ARGV'
require 'extend/string'
+require 'extend/symbol'
require 'utils'
require 'exceptions'
require 'set'