summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-30 03:21:06 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-30 03:21:06 +0000
commit8137152e01dbeaf8504f3d7e2117e22dfdf6801f (patch)
treec1a8f2ab996a6803544f3ecd63d4043adf433503
parent9e449748744cbb28ede16ecb3064e3fcb0899022 (diff)
* lib/rake/backtrace.rb: Removed duplication in
Rake::Backtrace::SUPPRESSED_PATHS * test/rake/test_rake_backtrace.rb: Skip tests when tmpdir is in the suppressed pattern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--lib/rake/backtrace.rb2
-rw-r--r--test/rake/test_rake_backtrace.rb8
3 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1710a33035..32b992e0a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Fri Nov 30 12:20:53 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rake/backtrace.rb: Removed duplication in
+ Rake::Backtrace::SUPPRESSED_PATHS
+ * test/rake/test_rake_backtrace.rb: Skip tests when tmpdir is in the
+ suppressed pattern.
+
Fri Nov 30 11:07:45 2012 Shugo Maeda <shugo@ruby-lang.org>
* revert r37993 to avoid SEGV in tests.
diff --git a/lib/rake/backtrace.rb b/lib/rake/backtrace.rb
index 038ca57906..e67132f67a 100644
--- a/lib/rake/backtrace.rb
+++ b/lib/rake/backtrace.rb
@@ -2,7 +2,7 @@ module Rake
module Backtrace
SUPPRESSED_PATHS =
RbConfig::CONFIG.values_at(*RbConfig::CONFIG.
- keys.grep(/(prefix|libdir)/)) + [
+ keys.grep(/(prefix|libdir)/)).uniq + [
File.join(File.dirname(__FILE__), ".."),
].map { |f| Regexp.quote(File.expand_path(f)) }
SUPPRESSED_PATHS.reject! { |s| s.nil? || s =~ /^ *$/ }
diff --git a/test/rake/test_rake_backtrace.rb b/test/rake/test_rake_backtrace.rb
index 98f1ee6646..cfd58f2aac 100644
--- a/test/rake/test_rake_backtrace.rb
+++ b/test/rake/test_rake_backtrace.rb
@@ -2,6 +2,14 @@ require File.expand_path('../helper', __FILE__)
require 'open3'
class TestRakeBacktrace < Rake::TestCase
+
+ def setup
+ super
+
+ skip 'tmpdir is suppressed in backtrace' if
+ Dir.pwd =~ Rake::Backtrace::SUPPRESS_PATTERN
+ end
+
# TODO: factor out similar code in test_rake_functional.rb
def rake(*args)
Open3.popen3(RUBY, "-I", @rake_lib, @rake_exec, *args) { |_, _, err, _|