From 1e0d3822eee80d59c03cd795425aa0c7b278cb75 Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Sat, 7 Feb 2009 20:42:39 -0800 Subject: [PATCH] Improve 'running under rubygems' check to deal with symlinks --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 5ca8ec833..cf0f46513 100644 --- a/Rakefile +++ b/Rakefile @@ -46,7 +46,7 @@ end # If running under rubygems... __DIR__ ||= File.expand_path(File.dirname(__FILE__)) -if Gem.path.any? {|path| %r(^#{Regexp.escape path}) =~ __DIR__} +if Gem.path.map{|path| Dir.chdir(path){ Dir.pwd } }.any? {|path| %r(^#{Regexp.escape path}) =~ __DIR__} task :default => :gem_build else desc "Build gemspec, then build eventmachine, then run tests."