tracia 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tracia/version.rb +1 -1
- data/lib/tracia.rb +3 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cb9b65fa0d3c36e530bdf201281a35c6f58d38273e2287b12d80688b2cc0a8a
|
4
|
+
data.tar.gz: b61d048ac0eb2f09cc432e2ca4aaa0035e4a1ab2d7e6d18b848cdce1d97b67a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5432ae3e05b76ca7fe8c90ef02843669e627e6aae92e42c257285f37cdcaa03215badbf9b2ad86cac9dc0462cef6a8e60190434de79612028fade99edb6c894b
|
7
|
+
data.tar.gz: c41e5de84fc6aba18dcecbadd856c4715f2ffd8ffdcfbc1cc93ffcd35956003f0d4948e313eb93621101395f50e54b26c7ebf41c394bf632a47ba63d77922491
|
data/lib/tracia/version.rb
CHANGED
data/lib/tracia.rb
CHANGED
@@ -18,7 +18,7 @@ class Tracia
|
|
18
18
|
def start(**opt)
|
19
19
|
trc = (Thread.current[:_tracia_] ||= new(**opt))
|
20
20
|
trc.level += 1
|
21
|
-
trc.depth = binding.frame_count
|
21
|
+
trc.depth = binding.frame_count + 1
|
22
22
|
yield
|
23
23
|
rescue StandardError => e
|
24
24
|
trc.error = e
|
@@ -36,7 +36,7 @@ class Tracia
|
|
36
36
|
trc = Thread.current[:_tracia_]
|
37
37
|
return unless trc
|
38
38
|
|
39
|
-
backtrace = binding.
|
39
|
+
backtrace = binding.partial_callers(-trc.depth)
|
40
40
|
backtrace.reverse!
|
41
41
|
backtrace.pop
|
42
42
|
trc.add(backtrace, info)
|
@@ -59,7 +59,7 @@ class Tracia
|
|
59
59
|
@trace_point = TracePoint.new(:raise) do |point|
|
60
60
|
bd = point.binding
|
61
61
|
next unless current_thread == bd.eval('Thread.current')
|
62
|
-
backtrace = bd.eval("binding.
|
62
|
+
backtrace = bd.eval("binding.partial_callers(-#{depth})")
|
63
63
|
raiser = backtrace[0]
|
64
64
|
next if raiser.klass == Tracia && raiser.frame_env == 'rescue in start'
|
65
65
|
backtrace.reverse!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tracia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ken
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.2.
|
47
|
+
version: 0.2.3
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.2.
|
54
|
+
version: 0.2.3
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- block24block@gmail.com
|