trace_location 0.12.1 → 0.12.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f49674737e97ee9ef9bd3b649db8e7541bd78719b41288d68040f827f65f13f6
4
- data.tar.gz: 7655524b37f01035e2559e2900f9b1345787743f91c4e4eef55fc36d3ab27b75
3
+ metadata.gz: 73634b4beb653f0e05265c961dfb77f82a7af55b6d623e588768d041b756f5f1
4
+ data.tar.gz: 487b8777837e9042b44891881784ae286c23fff98203d913b6d52e517265802c
5
5
  SHA512:
6
- metadata.gz: e319f7513317f0f0e9729d0cd638d6063fdec0d5f2997e7b3046c724a91629d23b6d714b45e8cbaa6b5572748803210926f22cad6a3846f2e8157364a21f43b8
7
- data.tar.gz: dda84c6c49a85acc1a8e218dae70b5ef3da3b06b21b7a545e0cfa983ee8379f622617fc8626aedc6c8054049c80edc71a9ba2a2cd454016453f66494b7cc8250
6
+ metadata.gz: dfd75357dd3ef4da9b644118bcc1f434e008823700c4a260cd02db2f024ad7f6916140649486e5db16a4df7dca669048efef8b293363aa328614136bf4ea71b6
7
+ data.tar.gz: 0a8877f99fbc51ff5be791a979bb61a9d124104a705e545048553522850694011b288ac1576e6d92fa1ac00e35c616e066b46da1fff29a311c44fc9d1478556d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trace_location (0.12.1)
4
+ trace_location (0.12.2)
5
5
  method_source
6
6
 
7
7
  GEM
@@ -12,7 +12,7 @@ GEM
12
12
  json (2.6.3)
13
13
  method_source (1.0.0)
14
14
  parallel (1.22.1)
15
- parser (3.1.3.0)
15
+ parser (3.2.0.0)
16
16
  ast (~> 2.4.1)
17
17
  rainbow (3.1.1)
18
18
  rake (13.0.6)
@@ -24,27 +24,27 @@ GEM
24
24
  rspec-mocks (~> 3.12.0)
25
25
  rspec-core (3.12.0)
26
26
  rspec-support (~> 3.12.0)
27
- rspec-expectations (3.12.0)
27
+ rspec-expectations (3.12.1)
28
28
  diff-lcs (>= 1.2.0, < 2.0)
29
29
  rspec-support (~> 3.12.0)
30
30
  rspec-mocks (3.12.1)
31
31
  diff-lcs (>= 1.2.0, < 2.0)
32
32
  rspec-support (~> 3.12.0)
33
33
  rspec-support (3.12.0)
34
- rubocop (1.40.0)
34
+ rubocop (1.42.0)
35
35
  json (~> 2.3)
36
36
  parallel (~> 1.10)
37
37
  parser (>= 3.1.2.1)
38
38
  rainbow (>= 2.2.2, < 4.0)
39
39
  regexp_parser (>= 1.8, < 3.0)
40
40
  rexml (>= 3.2.5, < 4.0)
41
- rubocop-ast (>= 1.23.0, < 2.0)
41
+ rubocop-ast (>= 1.24.1, < 2.0)
42
42
  ruby-progressbar (~> 1.7)
43
43
  unicode-display_width (>= 1.4.0, < 3.0)
44
- rubocop-ast (1.24.0)
44
+ rubocop-ast (1.24.1)
45
45
  parser (>= 3.1.1.0)
46
46
  ruby-progressbar (1.11.0)
47
- unicode-display_width (2.3.0)
47
+ unicode-display_width (2.4.1)
48
48
 
49
49
  PLATFORMS
50
50
  ruby
@@ -30,7 +30,16 @@ module TraceLocation
30
30
  mes = extract_method_from(trace_point)
31
31
  next if mes.source_location[0].match?(/\A(?:<internal:.+>|\(eval\))\z/)
32
32
 
33
- method_source = method_source_cache[mes] ||= remove_indent(mes.source)
33
+ method_source =
34
+ if method_source_cache.key?(mes)
35
+ method_source_cache[mes]
36
+ else
37
+ method_source_cache[mes] =
38
+ begin
39
+ remove_indent(mes.source)
40
+ rescue MethodSource::SourceNotFoundError
41
+ end
42
+ end
34
43
 
35
44
  case trace_point.event
36
45
  when :call
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TraceLocation
4
- VERSION = '0.12.1'
4
+ VERSION = '0.12.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trace_location
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshiyuki Hirano
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-01-04 00:00:00.000000000 Z
12
+ date: 2023-06-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: method_source