Permalink
Browse files

less invasive cleansing of const_missing backtrace

  • Loading branch information...
dchelimsky committed Mar 29, 2011
1 parent 277629e commit 733a76152ae4d4b26a6652935ec12b2474448e7f
Showing with 1 addition and 6 deletions.
  1. +1 −6 lib/rspec/expectations/backward_compatibility.rb
@@ -21,12 +21,7 @@ def const_missing(name)
begin
super
rescue Exception => e
- while e.backtrace.first !~ Regexp.compile(__FILE__)
- e.backtrace.shift
- end
- while e.backtrace.first =~ Regexp.compile(__FILE__)
- e.backtrace.shift
- end
+ e.backtrace.reject! {|l| l =~ Regexp.compile(__FILE__) }
raise e
end
end

0 comments on commit 733a761

Please sign in to comment.