aboutsummaryrefslogtreecommitdiffstats
path: root/Library/ENV/libsuperenv.rb
diff options
context:
space:
mode:
authorJack Nagel2013-11-21 14:50:35 -0600
committerJack Nagel2013-11-21 17:17:55 -0600
commit557ef72dbb730da869b01564998ff5b1409bb42f (patch)
tree37fca1d737ea9661c13eda8f0701872c9eb3c3a6 /Library/ENV/libsuperenv.rb
parentd2a38180e65d2475143cd214e8a3f682f5aa7818 (diff)
downloadhomebrew-557ef72dbb730da869b01564998ff5b1409bb42f.tar.bz2
Remove some monkeypatches
Diffstat (limited to 'Library/ENV/libsuperenv.rb')
-rw-r--r--Library/ENV/libsuperenv.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/Library/ENV/libsuperenv.rb b/Library/ENV/libsuperenv.rb
index e08fbba4d..c87e6a499 100644
--- a/Library/ENV/libsuperenv.rb
+++ b/Library/ENV/libsuperenv.rb
@@ -6,22 +6,18 @@
$:.unshift "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8"
class String
- def directory?; File.directory? self end
- def basename; File.basename self end
def cleanpath; require 'pathname'; Pathname.new(self).realpath.to_s rescue self end
def chuzzle; s = chomp; s unless s.empty? end
- def dirname; File.dirname(self) end
end
class NilClass
def chuzzle; end
- def directory?; false end
def split(x); [] end
end
class Array
def to_flags prefix
- select{|path| path.directory? }.uniq.map{|path| prefix+path }
+ select { |path| File.directory? path }.uniq.map { |path| prefix + path }
end
end