mutant 0.10.35 → 0.11.0

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: b90188339d2ae50f1bc48723f56dc2740b6932a99cd8aae263543734aa66c494
4
- data.tar.gz: dcd1e40f9dc9b37467ec067142da4f2c1c6351191de235b2a88237c16b6b936c
3
+ metadata.gz: dfa3f4386dd2bb68e31b67124aac333cf71d13bb2fec0cf46fea56360475f3f4
4
+ data.tar.gz: c1c3284ed18f7e2b268c8536a9103d11b7eb8abb0f3fc73a1890ffc8d461e9e5
5
5
  SHA512:
6
- metadata.gz: 323cc89a39fb5163c7778d5a9ae7e989e207c974436207803d91118c502e17219b47514573d24d2e9003043bb170744110e68c9fa8dc2201236566d1a2f701c7
7
- data.tar.gz: 4f27f289f727c157237f65a15241b8adce8f91027894690994908eb698895a4c81f57344138e7c1a010454aee06776a41460f1ed37a4f164871b58e71291c1ca
6
+ metadata.gz: a20b1be07d23f2a0939bab498c500cf1707f75c647af84409d5ec42437bdd26aa6d4f89c9f70e558408e1280812da0cbc7cf7758af1c80c499289e3554b0b92d
7
+ data.tar.gz: 276e169499aa4b48bc2488178de01b3d3ce1cb4647796bef023491c5d21faaed2d88e1ee61ae012c09d5c86f68ac68cda4a705174cc3cb88dab69e7cc4ea1578
@@ -82,7 +82,17 @@ module Mutant
82
82
  end
83
83
 
84
84
  def source_location
85
- target_method.source_location
85
+ signature = sorbet_signature
86
+
87
+ if signature
88
+ signature.method.source_location
89
+ else
90
+ target_method.source_location
91
+ end
92
+ end
93
+
94
+ def sorbet_signature
95
+ T::Private::Methods.signature_for_method(target_method)
86
96
  end
87
97
 
88
98
  def subject
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mutant
4
4
  # Current mutant version
5
- VERSION = '0.10.35'
5
+ VERSION = '0.11.0'
6
6
  end # Mutant
data/lib/mutant.rb CHANGED
@@ -14,6 +14,7 @@ require 'pathname'
14
14
  require 'regexp_parser'
15
15
  require 'set'
16
16
  require 'singleton'
17
+ require 'sorbet-runtime'
17
18
  require 'stringio'
18
19
  require 'unparser'
19
20
  require 'yaml'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.35
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Schirp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-17 00:00:00.000000000 Z
11
+ date: 2021-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diff-lcs
@@ -58,6 +58,20 @@ dependencies:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
60
  version: 2.0.3
61
+ - !ruby/object:Gem::Dependency
62
+ name: sorbet-runtime
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: 0.5.0
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: 0.5.0
61
75
  - !ruby/object:Gem::Dependency
62
76
  name: unparser
63
77
  requirement: !ruby/object:Gem::Requirement