File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ module Backtrace # :nodoc: all
10
10
map { |f | File . expand_path ( f ) } .
11
11
reject { |s | s . nil? || s =~ /^ *$/ }
12
12
SUPPRESSED_PATHS_RE = SUPPRESSED_PATHS . map { |f | Regexp . quote ( f ) } . join ( "|" )
13
+ SUPPRESSED_PATHS_RE << "|^<internal:\\ w+>"
13
14
SUPPRESSED_PATHS_RE << "|^org\\ /jruby\\ /\\ w+\\ .java" if
14
15
Object . const_defined? ( :RUBY_ENGINE ) and RUBY_ENGINE == "jruby"
15
16
Original file line number Diff line number Diff line change @@ -32,6 +32,14 @@ def test_near_system_dir_isnt_suppressed
32
32
33
33
assert_equal paths , actual
34
34
end
35
+
36
+ def test_ruby_array_each_suppressed
37
+ paths = [ "<internal:array>:52:in 'Array#each'" ]
38
+
39
+ actual = Rake ::Backtrace . collapse ( paths )
40
+
41
+ assert_equal [ ] , actual
42
+ end
35
43
end
36
44
37
45
class TestRakeBacktrace < Rake ::TestCase # :nodoc:
You can’t perform that action at this time.
0 commit comments