trace_tree 0.2.19 → 0.2.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 62deca45905349bd526ed97929de96a290b0bc72444d4142ddddadb8724f063b
4
- data.tar.gz: 2e34e08a382e0cd249184a5ee92fbac613e06dce30806c6e8d521eee779764ca
2
+ SHA1:
3
+ metadata.gz: 48d9b86dd78c922d3f2d3d9413fb585fb47c7a7c
4
+ data.tar.gz: 268aeca57f69a92b8c10be491d66dc3bce279637
5
5
  SHA512:
6
- metadata.gz: 53a7bcc1fcfba7bccb113c777022c98ad6bc38fe14b5b6c88985a4d26f3ab452e8d541301fa259274f26807d9d666d65593fb0746998e8bc557a98be4f5d4879
7
- data.tar.gz: b8bad2dea2b574bee4f0a1c82241587bcc708a2d2b042cbcf2fa18cedde6726d80b257b21b6c4a74f5795a754ebfbfa82c41b6894a76203872b1e3baf0be7801
6
+ metadata.gz: a08b1347a5614b84d312b931580c187cf44fc509ad0393d4fa27156b5c089137fd2fa2781ef934f1cbaff591607dbbc66303308423b1ac8ee016be59de49c2c4
7
+ data.tar.gz: 18fbc8579f464cae8b88073f05321d5d5ab612280879dcd55fb48982dd8b6b23be735155851de31ffacf71cd58531929fc01f03a8b321c816b4be21ace60f88d
@@ -1,3 +1,3 @@
1
1
  class TraceTree
2
- VERSION = "0.2.19"
2
+ VERSION = "0.2.20"
3
3
  end
data/lib/trace_tree.rb CHANGED
@@ -112,7 +112,7 @@ class TraceTree
112
112
  if (@no_methods = Array(opt[:no_methods])).empty?
113
113
  nil
114
114
  else
115
- stack_filter = 'return false unless outside_hidden_stack?(point)'
115
+ 'return false unless outside_hidden_stack?(point)'
116
116
  end
117
117
 
118
118
  path_filter =
@@ -131,8 +131,8 @@ class TraceTree
131
131
  filter_method = <<-EOM
132
132
  def wanted? point
133
133
  return false if point.end_of_trace?
134
- return true if native?(point) || point.thread_relative?
135
134
  #{stack_filter}
135
+ return true if native?(point) || point.thread_relative?
136
136
  return true if point.method_defined_by_define_method?
137
137
  #{path_filter}
138
138
  true
@@ -151,7 +151,17 @@ class TraceTree
151
151
  stack = (point.thread[:trace_tree_no_methods_stack] ||= [])
152
152
  empty = stack.empty?
153
153
 
154
- if @no_methods.any?{ |pattern| pattern =~ point.method_name }
154
+ if point.event == :b_call || point.event == :b_return
155
+ return true if empty
156
+ if point.terminate?(stack.last)
157
+ stack.pop
158
+ else
159
+ stack << point
160
+ end
161
+ return false
162
+ end
163
+
164
+ if @no_methods.any?{ |pattern| pattern =~ point.method_id }
155
165
  if !empty && point.terminate?(stack.last)
156
166
  stack.pop
157
167
  else
data/trace_tree.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.add_development_dependency "bundler", "~> 1.14"
23
+ spec.add_development_dependency "bundler", "> 1.14"
24
24
  spec.add_development_dependency "rake", "~> 10.0"
25
25
  spec.add_development_dependency "minitest", "~> 5.0"
26
26
  spec.add_development_dependency "pry"
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trace_tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.19
4
+ version: 0.2.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - ken
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-22 00:00:00.000000000 Z
11
+ date: 2019-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.14'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.14'
27
27
  - !ruby/object:Gem::Dependency
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  version: '0'
192
192
  requirements: []
193
193
  rubyforge_project:
194
- rubygems_version: 2.7.6
194
+ rubygems_version: 2.5.2.3
195
195
  signing_key:
196
196
  specification_version: 4
197
197
  summary: Print TracePoint(:b_call, :b_return, :c_call, :c_return, :call, :return,