appmap 0.99.1 → 0.99.2

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: ff070f04eeeb2d79a08d4f93462a84e277dfad345bffd1d6b87bd063a63b8f00
4
- data.tar.gz: 27e47f4e5a85fce938cbd259bf76cce952490851cfee98315fddf6d6b1c798d3
3
+ metadata.gz: c0d8aa81209b5f8d33fc480c3ff3b7f6cd61027dc51fad74c9ad4f19ba6c7faf
4
+ data.tar.gz: 5d8ac162d8cf5eacfc045ff81a16c2b473df79ae0619ddaface5b4bab8d422cb
5
5
  SHA512:
6
- metadata.gz: 97db1ff69373241c3e2ca4633fcca4c800d72b60734bde3b32aae2d3765e86f484e490a4148b98c9e90c40b3fa68cc9b734e56ce9175d1e26ec9bfc767b9707e
7
- data.tar.gz: 074b036daecfc348fbe13510ab7c6cca46fe8d2d630bd81e28808ef4f05e15b47dedda31e9d3a2e423f426ba0980ea04e50439b3533b8b7690c9047be199a1a9
6
+ metadata.gz: 34c7b6b0fd6e45c33158776e3c3f1a8725031913ad49856f24aa5af50cbc41efd2e047face5c3c1f02a9c20670af08be43492e5bd665a17323578c735b07900b
7
+ data.tar.gz: 0ea3f5be3436ea8eec1d8e14cd959b67e6e4547d03de6401c6e21250b3ba91b521b57f665298e1e4ec3be9616a1fbcf0a2f11b8ff09a5c53cd0d60c2d4a358f6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.99.2](https://github.com/getappmap/appmap-ruby/compare/v0.99.1...v0.99.2) (2023-05-10)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Ensure that signature hash key consists of strings ([acb5db9](https://github.com/getappmap/appmap-ruby/commit/acb5db9ecb0a6cdf40de83bf506f45f5283f641b))
7
+
1
8
  ## [0.99.1](https://github.com/getappmap/appmap-ruby/compare/v0.99.0...v0.99.1) (2023-04-24)
2
9
 
3
10
 
data/lib/appmap/config.rb CHANGED
@@ -499,6 +499,11 @@ module AppMap
499
499
  end
500
500
 
501
501
  def never_hook?(cls, method)
502
+ unless method
503
+ HookLog.log "method is nil" if HookLog.enabled?
504
+ return true
505
+ end
506
+
502
507
  _, separator, = ::AppMap::Hook.qualify_method_name(method)
503
508
  if exclude.member?(cls.name) || exclude.member?([ cls.name, separator, method.name ].join)
504
509
  HookLog.log "Hooking of #{method} disabled by configuration" if HookLog.enabled?
@@ -4,11 +4,23 @@ require 'appmap/util'
4
4
 
5
5
  module AppMap
6
6
  class Hook
7
+ class << self
8
+ def method_hash_key(cls, method)
9
+ [ cls, method.name ].hash
10
+ rescue TypeError => e
11
+ warn "Error building hash key for #{cls}, #{method}: #{e}"
12
+ end
13
+ end
14
+
15
+
7
16
  SIGNATURES = {}
8
17
  LOOKUP_SIGNATURE = lambda do |id|
9
18
  method = super(id)
10
19
 
11
- signature = SIGNATURES[[ method.owner, method.name ]]
20
+ hash_key = Hook.method_hash_key(method.owner, method)
21
+ return method unless hash_key
22
+
23
+ signature = SIGNATURES[hash_key]
12
24
  if signature
13
25
  method.singleton_class.module_eval do
14
26
  define_method(:parameters) do
@@ -48,7 +60,8 @@ module AppMap
48
60
  end
49
61
 
50
62
  hook_method_parameters = hook_method.parameters.dup.freeze
51
- SIGNATURES[[ hook_class, hook_method.name ]] = hook_method_parameters
63
+ hash_key = Hook.method_hash_key(hook_class, hook_method)
64
+ SIGNATURES[hash_key] = hook_method_parameters if hash_key
52
65
 
53
66
  # irb(main):001:0> Kernel.public_instance_method(:system)
54
67
  # (irb):1:in `public_instance_method': method `system' for module `Kernel' is private (NameError)
@@ -3,7 +3,7 @@
3
3
  module AppMap
4
4
  URL = 'https://github.com/applandinc/appmap-ruby'
5
5
 
6
- VERSION = '0.99.1'
6
+ VERSION = '0.99.2'
7
7
 
8
8
  APPMAP_FORMAT_VERSION = '1.12.0'
9
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.99.1
4
+ version: 0.99.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Gilpin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-24 00:00:00.000000000 Z
11
+ date: 2023-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: method_source