orthoses 1.16.0 → 1.17.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: d2799fba99407dbfe097d59c7fcd5238e5bc50b5e5c51bf6ac98402b0a67a8c0
4
- data.tar.gz: 2c9f343a3d3aa78bbb00b72790105b3a54ec98a326b805ee08125033d2d60739
3
+ metadata.gz: e7d32af3f7ca57a532b811d511f214250dab712748f88602089d23349375c46d
4
+ data.tar.gz: 197966b36e96be58eb2aeea816090e2c24ebeec954175ee2d24a8cec07771b15
5
5
  SHA512:
6
- metadata.gz: 4602f93d07de6f57cf37d48a26b37a9bcec04164a552fdb004e49255385b436d886718be415dda06ba4151fd68345e1cf48731cdbad2a5f1e0b676998cb7baa6
7
- data.tar.gz: 7576d486cd86dd12674dfe97a71a2d64defbb289a5dca1fe762c4244a4e573f962c5d3f9585b1c469a8119a160e37cd7c8695e4e04e32cc51d7c2844fb6bf118
6
+ metadata.gz: d70aeed9a896b32671d41f23c3bdba9efbb5679bd7c2c6bb0a3ead0976a26ee1a903a8b9ce1b748509efc94b6f8f1f66aea0e04a92d6efef8958b85785e81686
7
+ data.tar.gz: 8f186cc6a6ceeff80267d9dd6150e9d1d8cd96e5a37446314195a0b0f6adf7132356dbca50c61a275b0e16a33aac184b5969c8b39c2b49089d6998e98b491fea
@@ -30,6 +30,7 @@ module Orthoses
30
30
  cache[[current, const]] = true
31
31
 
32
32
  if val.kind_of?(Module)
33
+ next unless @if.nil? || @if.call(current, const, val, nil)
33
34
  will_add_key_and_content << [Utils.module_name(val), nil]
34
35
  next
35
36
  end
@@ -34,18 +34,20 @@ module Orthoses
34
34
 
35
35
  def build_trace_point
36
36
  TracePoint.new(:call, :return, :raise) do |tp|
37
- case tp.event
38
- when :call
39
- if tp.defined_class.singleton_class?
40
- mod_name = Utils.attached_module_name(tp.defined_class) or next
41
- kind = :singleton
42
- else
43
- mod_name = Utils.module_name(tp.defined_class) or next
44
- kind = :instance
45
- end
37
+ next unless tp.defined_class
38
+
39
+ if tp.defined_class.singleton_class?
40
+ mod_name = Utils.attached_module_name(tp.defined_class) or next
41
+ kind = :singleton
42
+ else
43
+ mod_name = Utils.module_name(tp.defined_class) or next
44
+ kind = :instance
45
+ end
46
46
 
47
- next unless target?(mod_name)
47
+ next unless target?(mod_name)
48
48
 
49
+ case tp.event
50
+ when :call
49
51
  visibility = tp.self.private_methods.include?(tp.method_id) ? :private : nil
50
52
  key = [mod_name, kind, visibility, tp.method_id]
51
53
  op_name_types = tp.parameters.map do |op, name|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Orthoses
4
- VERSION = "1.16.0"
4
+ VERSION = "1.17.0"
5
5
  end
data/lib/orthoses.rb CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'rbs'
4
4
  require 'pathname'
5
+ require 'stringio'
5
6
 
6
7
  require 'orthoses/utils'
7
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orthoses
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.0
4
+ version: 1.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-29 00:00:00.000000000 Z
11
+ date: 2024-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rbs
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  requirements: []
134
- rubygems_version: 3.5.16
134
+ rubygems_version: 3.5.22
135
135
  signing_key:
136
136
  specification_version: 4
137
137
  summary: Framework for Generate RBS