tracia 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tracia/frame.rb +0 -9
- data/lib/tracia/version.rb +1 -1
- data/lib/tracia.rb +4 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 978a7b204dede4d5be2b8a78975266d59a16c0e93363b3e831d05b4d2cab7584
|
4
|
+
data.tar.gz: eb99548c2f027ca0242c513bb95369b3737fa12adf827c61eeb742341e16bee8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 990222bdcf8274d78bf63d68e97d3a7255c04a6da833f3638a6d82cbebb13f0a5f28aaa4039316975fa1543fac96b4771f630d96633c4bce54e6043c6e8eaea7
|
7
|
+
data.tar.gz: b613ca56e63b58cce4bb5cfca0a91f2c9113a00fbb6206d5f6bab3e7f6010c953c6fdd35966b2de3520477a04cff416188acc22df93b22c2214baacb0485c92e
|
data/lib/tracia/frame.rb
CHANGED
@@ -50,16 +50,7 @@ class Tracia
|
|
50
50
|
"#{klass}#{call_sym}#{method_name}"
|
51
51
|
end
|
52
52
|
|
53
|
-
INSTANCE_METHOD_SHARP = '#'
|
54
|
-
|
55
53
|
def source_location
|
56
|
-
if @file == nil
|
57
|
-
meth = call_sym == INSTANCE_METHOD_SHARP ? klass.instance_method(method_name) : klass.method(method_name)
|
58
|
-
src_loc = meth.source_location
|
59
|
-
@file = src_loc[0]
|
60
|
-
@lineno = src_loc[1]
|
61
|
-
end
|
62
|
-
|
63
54
|
"#{GemPaths.shorten(@file)}:#{@lineno}"
|
64
55
|
end
|
65
56
|
end
|
data/lib/tracia/version.rb
CHANGED
data/lib/tracia.rb
CHANGED
@@ -10,6 +10,8 @@ require "binding_of_callers"
|
|
10
10
|
class Tracia
|
11
11
|
class Error < StandardError; end
|
12
12
|
|
13
|
+
INSTANCE_METHOD_SHARP = '#'
|
14
|
+
|
13
15
|
attr_accessor :level, :error, :depth
|
14
16
|
|
15
17
|
class << self
|
@@ -140,8 +142,6 @@ class Tracia
|
|
140
142
|
@frames_to_reject.any?{ |rj| rj =~ raw_frame.file }
|
141
143
|
end
|
142
144
|
|
143
|
-
EMPTY_SRC_LOC = []
|
144
|
-
|
145
145
|
def convert_to_frames(callers)
|
146
146
|
callers.map! do |c|
|
147
147
|
_binding = c._binding
|
@@ -151,9 +151,8 @@ class Tracia
|
|
151
151
|
|
152
152
|
source_location =
|
153
153
|
if _binding.frame_type == :method
|
154
|
-
|
155
|
-
|
156
|
-
EMPTY_SRC_LOC
|
154
|
+
meth = call_symbol == INSTANCE_METHOD_SHARP ? klass.instance_method(frame_env) : klass.method(frame_env)
|
155
|
+
meth.source_location
|
157
156
|
else
|
158
157
|
_binding.source_location
|
159
158
|
end
|