Permalink
Browse files

suppress more backtrace lines using RbConfig info

  • Loading branch information...
quix committed Aug 7, 2011
1 parent 1b53296 commit 18f49191c1a823c1d5319df125b7de9de800ad66
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/rake/backtrace.rb
View
@@ -1,9 +1,10 @@
module Rake
module Backtrace
- SUPPRESSED_PATHS = [
- RbConfig::CONFIG["prefix"],
- File.join(File.dirname(__FILE__), ".."),
- ].map { |f| Regexp.quote(File.expand_path(f)) }
+ SUPPRESSED_PATHS =
+ RbConfig::CONFIG.values_at(*RbConfig::CONFIG.
+ keys.grep(/(prefix|libdir)/)) + [
+ File.join(File.dirname(__FILE__), ".."),
+ ].map { |f| Regexp.quote(File.expand_path(f)) }
SUPPRESS_PATTERN = %r!(\A#{SUPPRESSED_PATHS.join('|')}|bin/rake:\d+)!

0 comments on commit 18f4919

Please sign in to comment.