rbi 0.1.3 → 0.1.5

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: 5cc6303b86c0b3b1292e099fc6e9ff2c93c60bb037fafcfe2590604a0ed478c2
4
- data.tar.gz: 2236bb45edc75082c3f9ad930550e9a004f25303a58249ceb1880149b5cb1f37
3
+ metadata.gz: 9075a95a8cb4b03c7347db2340f3fba31a36bf4bad5550f0a1cc1740202163e8
4
+ data.tar.gz: 63af17058ecdad2d89dcbf4735fbca7f21cce5cce13319a80a1b067d97a77464
5
5
  SHA512:
6
- metadata.gz: 701247c0c71ea9535baaed16e813a741595a79e020c9bce294fafc291e71eac90f84cca974a68860aed8509986d159290481b5a1c83cab64d030fd683c55ea67
7
- data.tar.gz: e8fdf27c22593876dd7e0c08098ee77927d851ca636bfc816c137667d85bd1314a38eca69b1f14fd1b12d7940eb5ee5dfe3b21415a3c23fbe2eb05d08d3c4c7d
6
+ metadata.gz: cf16bd74cee43b403e5565851ddfeeb6cadca77144bb63caf3511ffb429dc3889e02559f41319dc41ecc29d9e24768c08dc2f8eb76e74158ee2c23de93ac4251
7
+ data.tar.gz: 06da7aa694925d4a430cb8ea36eb73b1afa4cd11e49160dd1f40ae91ae0cb15b3dd67413a520681bc789e874a6b686d8e38951a1747f3952b7a52d23b8ff1039
data/lib/rbi/parser.rb CHANGED
@@ -606,19 +606,17 @@ module RBI
606
606
  end
607
607
 
608
608
  node.keywords.each do |param|
609
- next unless param.is_a?(Prism::KeywordParameterNode)
610
-
611
- value = param.value
612
- params << if value
613
- KwOptParam.new(
609
+ case param
610
+ when Prism::RequiredKeywordParameterNode
611
+ params << KwParam.new(
614
612
  param.name.to_s.delete_suffix(":"),
615
- node_string!(value),
616
613
  loc: node_loc(param),
617
614
  comments: node_comments(param),
618
615
  )
619
- else
620
- KwParam.new(
616
+ when Prism::OptionalKeywordParameterNode
617
+ params << KwOptParam.new(
621
618
  param.name.to_s.delete_suffix(":"),
619
+ node_string!(param.value),
622
620
  loc: node_loc(param),
623
621
  comments: node_comments(param),
624
622
  )
data/lib/rbi/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module RBI
5
- VERSION = "0.1.3"
5
+ VERSION = "0.1.5"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Terrasa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-03 00:00:00.000000000 Z
11
+ date: 2023-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prism
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.15.1
19
+ version: 0.18.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '0.17'
22
+ version: '0.19'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.15.1
29
+ version: 0.18.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '0.17'
32
+ version: '0.19'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: sorbet-runtime
35
35
  requirement: !ruby/object:Gem::Requirement