Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6d79a69
Add Steepfile
sue445 Oct 12, 2024
0334814
Add steep gem
sue445 Oct 12, 2024
5401b4f
Add rake rbs
sue445 Oct 12, 2024
eb9bf82
Run rbs on CI
sue445 Oct 12, 2024
cfc1e03
Extract to rubocop job
sue445 Oct 12, 2024
32c8664
Add rbs_collection.yaml
sue445 Oct 12, 2024
ab1380a
rbs collection install
sue445 Oct 12, 2024
519e9e8
Ignore .gem_rbs_collection/
sue445 Oct 12, 2024
7b11eee
Add rbs-collection-updater.yml
sue445 Oct 12, 2024
dce6ee2
Add argument_definition.rbs
sue445 Oct 12, 2024
723189f
Add enum_definition.rbs
sue445 Oct 12, 2024
2aed003
Add struct_definition.rbs
sue445 Oct 12, 2024
06e8035
Add type_definition.rbs
sue445 Oct 12, 2024
45c5a1c
Add typeref_definition.rbs
sue445 Oct 12, 2024
25fc896
Add function_definition.rbs
sue445 Oct 12, 2024
9a12339
Add yaml to rbs_collection.yaml
sue445 Oct 12, 2024
2420fd4
Workaround for Ruby::ArgumentTypeMismatch
sue445 Oct 12, 2024
a74e6d1
Add data.rbs
sue445 Oct 12, 2024
9a19f4a
Add util.rbs
sue445 Oct 12, 2024
37a09c0
Workaround for Ruby::BlockTypeMismatch
sue445 Oct 12, 2024
b6323d1
Add parser.rbs
sue445 Oct 12, 2024
d2f5267
Add sig for Error
sue445 Oct 13, 2024
7ce2dcf
Workaround for [error] cannot find compatible overloading of method `…
sue445 Oct 13, 2024
1ed7ca6
Fixed [error] Cannot pass a value of type `(:ref | :raw | nil)` as an…
sue445 Oct 13, 2024
a8145f0
Fixed [error] Cannot pass a value of type `(::Symbol | nil)` as an ar…
sue445 Oct 13, 2024
b5fad90
Fixed [error] Type `(::Array[::String] | nil)` does not have method `…
sue445 Oct 13, 2024
8583271
Fixed [error] Type `(::String | nil)` does not have method `gsub`
sue445 Oct 13, 2024
9285dba
Fixed [error] Type `(::String | nil)` does not have method `length`
sue445 Oct 13, 2024
0371bd7
Fixed [error] Cannot pass a value of type `::Hash[::Symbol, bool]` as…
sue445 Oct 13, 2024
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed [error] Type (::Array[::String] | nil) does not have method `…
…join`

```
lib/ruby_header_parser/parser.rb:304:55: [error] Type `(::Array[::String] | nil)` does not have method `join`
│ Diagnostic ID: Ruby::NoMethod
│
└       original_type = Util.sanitize_type(parts[0...-1].join(" "))
                                                         ~~~~
```
  • Loading branch information
sue445 committed Oct 13, 2024
commit b5fad908d31f8b23263d85140a187348c0d07497
3 changes: 2 additions & 1 deletion lib/ruby_header_parser/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ def generate_argument_definition(function_name:, arg:, arg_pos:)
# - length [Integer]
def analyze_argument_type(function_name:, arg_pos:, parts:)
pointer, length = prepare_argument_parts(arg_pos:, parts:)
original_type = Util.sanitize_type(parts[0...-1].join(" "))
type = parts[0...-1] || []
original_type = Util.sanitize_type(type.join(" "))

case original_type
when /\*+$/
Expand Down