rbi 0.0.12 → 0.0.13

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: ff552cac7ef282e9673502662c239c6e60e370d4d9e6d137db16ed03bd3c5a32
4
- data.tar.gz: 6ca736d5854621dde27bafffd8ad4b393d2c60d5f7b9e4eba8ab938e7f9123f4
3
+ metadata.gz: c5ef2a157e342a16c69748e0f09b67839152d10e99a3b7eab4da23354b8993f9
4
+ data.tar.gz: 6622c783e58b67a950e4661a025f8d0a9508612eda9ee53af45f72e6c5057286
5
5
  SHA512:
6
- metadata.gz: 9540175cf17bd99421f4c0e2d81dae2a6b79a0ba3528409c1aeb0fbc4923eb01b2b9a5d6d28a17c1b7d0ac4a4b06f10775ecabc460f54ad39fa5099256554730
7
- data.tar.gz: 75a8657c94d508c5b53793be7b53fe6570850c6088cd67fc75c85b5d42555824b248d6f2c7a62527e8e50555276eb4e32ba33bb406c948d66a1f0a11f7f16014
6
+ metadata.gz: 598e6384b4aca8b6db5aa97d6a00e6a75cb1bb4273d5401006c969c4d89730797942c8d0ff7fed0a8da25f6170747126c064c6aadbec210ebb28e4781772ab26
7
+ data.tar.gz: 6021bd1134be4dfd834ece8648ea904ad30666216411c7524a9f4245f14ecab7b1e6da9d013a8c0bb4a9620fde7db83190b54f7bb512f7d1d23275300112482e
data/lib/rbi/parser.rb CHANGED
@@ -429,7 +429,14 @@ module RBI
429
429
  sig { params(node: AST::Node).returns(TEnumBlock) }
430
430
  def parse_enum(node)
431
431
  enum = TEnumBlock.new
432
- node.children[2].children.each do |child|
432
+
433
+ body = if node.children[2].type == :begin
434
+ node.children[2].children
435
+ else
436
+ [node.children[2]]
437
+ end
438
+
439
+ body.each do |child|
433
440
  enum << parse_name(child)
434
441
  end
435
442
  enum.loc = node_loc(node)
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.0.12"
5
+ VERSION = "0.0.13"
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.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Terrasa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-08 00:00:00.000000000 Z
11
+ date: 2022-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast