tracia 0.2.6 → 0.2.7

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
2
  SHA256:
3
- metadata.gz: 7e8c70f863ced4e60aeeb7d6dc343f568a88df17cb67d039adc7c921fa8149a8
4
- data.tar.gz: f60c5dc69ccfe8318d5ba951dfbe546e013c87eb0d3641345aaffe96d416d524
3
+ metadata.gz: 978a7b204dede4d5be2b8a78975266d59a16c0e93363b3e831d05b4d2cab7584
4
+ data.tar.gz: eb99548c2f027ca0242c513bb95369b3737fa12adf827c61eeb742341e16bee8
5
5
  SHA512:
6
- metadata.gz: 998c2b5b36a92167c085ca15a0898002c06c5419f9e484342f7b7aa0607bdb8fbdd63c08af26eb219c77d3021828e2bc9a4776cd2d893798d7e0a4d8bb5fd803
7
- data.tar.gz: 86aa94fb518e44b9498562212c3ad91dbafaadd08af53eb3580b4ae8d07452b5274369d5d99e7b87c93ab38fc9468d17a3e0280f3dca9e5622908ccd227b3978
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Tracia
4
- VERSION = "0.2.6"
4
+ VERSION = "0.2.7"
5
5
  end
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
- # meth = call_symbol == INSTANCE_METHOD_SHARP ? klass.instance_method(frame_env) : klass.method(frame_env)
155
- # meth.source_location
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tracia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - ken