trace_tree 0.2.15 → 0.2.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trace_tree/version.rb +1 -1
- data/lib/trace_tree.rb +23 -19
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb7a1e555384e2acad9ff6f9b7f51a120cbd35bca05afa9ce7470e358d3f3ea7
|
4
|
+
data.tar.gz: 4cfb486a427b2c6dc2aaff7b1fa5e4a9183bdf52249ee20b23cc580ea76e8081
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9ee20d2b1adbb2105567b5d392f2e586b13abe14da5e471d1379af837848379f7b6f52e4f76d45668d98e814125b0bb5c4596194840ad2de21fc613853ea3e7
|
7
|
+
data.tar.gz: bfa96688b71d085e54ec44990de682d4054c0d28d0b9d0c5bfc2e84b71c85830e916ee7c4d4d5f37a7ea985b7ccd3b5d25a7c2612e42401f49c7ec17762521cc
|
data/lib/trace_tree/version.rb
CHANGED
data/lib/trace_tree.rb
CHANGED
@@ -96,35 +96,39 @@ class TraceTree
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def make_filter
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
if opt.key?(:out)
|
107
|
-
@out = Array(opt[:out])
|
108
|
-
filters << '@out.all?{ |pattern| pattern !~ point.path }'
|
109
|
-
end
|
99
|
+
stack_filter =
|
100
|
+
if (@no_methods = Array(opt[:no_methods])).empty?
|
101
|
+
nil
|
102
|
+
else
|
103
|
+
stack_filter = 'return false unless outside_hidden_stack?(point)'
|
104
|
+
end
|
110
105
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
106
|
+
path_filter =
|
107
|
+
if opt.key?(:in) || opt.key?(:out)
|
108
|
+
@in = Array(opt[:in] || //)
|
109
|
+
@out = Array(opt[:out])
|
110
|
+
'return false unless @in.any?{ |pattern| pattern =~ point.path } && @out.all?{ |pattern| pattern !~ point.path }'
|
111
|
+
else
|
112
|
+
nil
|
113
|
+
end
|
115
114
|
|
116
|
-
if
|
115
|
+
if stack_filter.nil? && path_filter.nil?
|
117
116
|
return @deal = -> point { trace_points << point_loader.create(point) }
|
118
117
|
end
|
119
118
|
|
120
|
-
|
119
|
+
filter_method = <<-EOM
|
121
120
|
def wanted? point
|
122
121
|
return false if point.end_of_trace?
|
123
|
-
return true if native?(point) || point.thread_relative?
|
124
|
-
#{
|
122
|
+
return true if native?(point) || point.thread_relative?
|
123
|
+
#{stack_filter}
|
124
|
+
return true if point.method_defined_by_define_method?
|
125
|
+
#{path_filter}
|
126
|
+
true
|
125
127
|
end
|
126
128
|
EOM
|
127
129
|
|
130
|
+
self.singleton_class.class_eval filter_method
|
131
|
+
|
128
132
|
@deal = -> point do
|
129
133
|
po = point_loader.create(point)
|
130
134
|
trace_points << po if wanted? po
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trace_tree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ken
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|