rbs-trace 0.3.0 → 0.3.1

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: 64b5ec23a4828eaf4ac618e5589d1d68578e85d11033efb676350ad19cbd660d
4
- data.tar.gz: e313d83a44217fec2c8db6e33f84c03fff39ae7c300c9168f64fdaf62c61c416
3
+ metadata.gz: 2f0c689aa7e7519cd2ba4338c195c39dad1baa4022c96ed79b091b7e0051ba4a
4
+ data.tar.gz: 22b18905f9ae5b4a4cc3a9714a8db2b0289d822730752942dfa2aa1160864ed8
5
5
  SHA512:
6
- metadata.gz: eef77ab67d92f461c1faa8266227678985cf79afef932abf02beb90f63e766de36cf688a7f23ba5457b63de67de46caf974a285325bbd03c9b74ef9d08504bd3
7
- data.tar.gz: dc73fef50a753cad90f0f00d83613f7199bc297ea4f159fd65d042d8ea3fe36c8ee9f76cf6af441c0eeae3fa25beada143527158858521c05becb84847aa635a
6
+ metadata.gz: 83ba38515e5363c85fb866709e063de85211e4c5b61dc9ff08277aa7e805f7fa92a7e9d515cf6b6786980b6f791f8f04517fc447971c62f85fa3d2189da2dbdb
7
+ data.tar.gz: 91eb1069c5e6fe40d6fcda2f8f0ac07bf63e34dc59492322e102335f294ab6cd52cd5b3b7a1ad6574e2eb04c2630951305d8ab910ff2c85e80195dcc33fef11e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.3.1] - 2024-10-19
4
+
5
+ - fix: Fix the number of types specified in generics
6
+ - fix: Fix the type of the method that raises the exception
7
+
3
8
  ## [0.3.0] - 2024-10-10
4
9
 
5
10
  - feat: Support eval
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- rbs-trace (0.3.0)
4
+ rbs-trace (0.3.1)
5
5
  prism (>= 0.3.0)
6
6
 
7
7
  GEM
@@ -80,8 +80,10 @@ module RBS
80
80
  nil
81
81
  elsif [TrueClass, FalseClass].include?(k) # steep:ignore ArgumentTypeMismatch
82
82
  "bool"
83
- elsif [Array, Hash].include?(k) # steep:ignore ArgumentTypeMismatch
83
+ elsif [Array, Range].include?(k) # steep:ignore ArgumentTypeMismatch
84
84
  "#{k}[untyped]"
85
+ elsif k == Hash
86
+ "#{k}[untyped, untyped]"
85
87
  elsif k == Object
86
88
  "untyped"
87
89
  else
@@ -32,7 +32,7 @@ module RBS
32
32
 
33
33
  # @rbs () -> TracePoint
34
34
  def trace
35
- @trace ||= TracePoint.new(:call, :return, :raise) { |tp| record(tp) }
35
+ @trace ||= TracePoint.new(:call, :return) { |tp| record(tp) }
36
36
  end
37
37
 
38
38
  # @rbs () -> Logger
@@ -75,7 +75,7 @@ module RBS
75
75
  case tp.event
76
76
  when :call
77
77
  call_event(tp)
78
- when :return, :raise
78
+ when :return
79
79
  return_event(tp, definition)
80
80
  end
81
81
  rescue StandardError => e
@@ -110,7 +110,7 @@ module RBS
110
110
  # TODO: check usecase where decl is nil
111
111
  return unless decl
112
112
 
113
- decl.return_type = tp.event == :return ? [obj_to_class(tp.return_value)] : [NilClass]
113
+ decl.return_type = [obj_to_class(tp.return_value)]
114
114
  definition.decls << decl
115
115
  end
116
116
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RBS
4
4
  module Trace
5
- VERSION = "0.3.0"
5
+ VERSION = "0.3.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbs-trace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takumi Shotoku
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-09 00:00:00.000000000 Z
11
+ date: 2024-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prism
@@ -64,8 +64,8 @@ licenses:
64
64
  - MIT
65
65
  metadata:
66
66
  homepage_uri: https://github.com/sinsoku/rbs-trace
67
- source_code_uri: https://github.com/sinsoku/rbs-trace/tree/v0.3.0
68
- changelog_uri: https://github.com/sinsoku/rbs-trace/blob/v0.3.0/CHANGELOG.md
67
+ source_code_uri: https://github.com/sinsoku/rbs-trace/tree/v0.3.1
68
+ changelog_uri: https://github.com/sinsoku/rbs-trace/blob/v0.3.1/CHANGELOG.md
69
69
  rubygems_mfa_required: 'true'
70
70
  post_install_message:
71
71
  rdoc_options: []